Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #898 from 9rnsr/fix13148
Browse files Browse the repository at this point in the history
[REG2.066a] Issue 13148 - ModuleInfo fields are unnecessary changed to const
  • Loading branch information
dnadlinger committed Jul 17, 2014
2 parents 5b446ab + 090cf82 commit c796f0d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/object.di
Expand Up @@ -277,10 +277,10 @@ class MemberInfo_function : MemberInfo

struct ModuleInfo
{
const:
uint _flags;
uint _index;

const:
@property uint index() nothrow pure;
@property uint flags() nothrow pure;
@property void function() tlsctor() nothrow pure;
Expand Down
15 changes: 11 additions & 4 deletions src/object_.d
Expand Up @@ -1589,10 +1589,10 @@ enum

struct ModuleInfo
{
const:
uint _flags;
uint _index; // index into _moduleinfo_array[]

const:
private void* addrOf(int flag) nothrow pure
in
{
Expand Down Expand Up @@ -1725,15 +1725,22 @@ const:
// return null;
}

alias int delegate(immutable(ModuleInfo*)) ApplyDg;

static int opApply(scope ApplyDg dg)
static int opApply(scope int delegate(immutable(ModuleInfo*)) dg)
{
import rt.minfo;
return rt.minfo.moduleinfos_apply(dg);
}
}

unittest
{
ModuleInfo mi;
foreach (m; ModuleInfo)
{
mi = *m;
break;
}
}

///////////////////////////////////////////////////////////////////////////////
// Monitor
Expand Down

0 comments on commit c796f0d

Please sign in to comment.