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 #263 from alexrp/master
Browse files Browse the repository at this point in the history
Make druntime build again by adding missing const qualifiers.
  • Loading branch information
andralex committed Jul 9, 2012
2 parents d39bd49 + 91858ed commit 56c371c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions import/object.di
Expand Up @@ -193,7 +193,7 @@ class TypeInfo
int compare(in void* p1, in void* p2) const;
@property size_t tsize() nothrow pure const @safe;
void swap(void* p1, void* p2) const;
@property TypeInfo next() nothrow pure const;
@property const(TypeInfo) next() nothrow pure const;
const(void)[] init() nothrow pure const @safe; // TODO: make this a property, but may need to be renamed to diambiguate with T.init...
@property uint flags() nothrow pure const @safe;
// 1: // has possible pointers into GC memory
Expand Down Expand Up @@ -231,7 +231,7 @@ class TypeInfo_Array : TypeInfo
override int compare(in void* p1, in void* p2);
override @property size_t tsize() nothrow pure;
override void swap(void* p1, void* p2);
override @property TypeInfo next() nothrow pure;
override @property const(TypeInfo) next() nothrow pure const;
override @property uint flags() nothrow pure;
override @property size_t talign() nothrow pure;
version (X86_64) override int argTypes(out TypeInfo arg1, out TypeInfo arg2);
Expand Down
6 changes: 3 additions & 3 deletions src/core/runtime.d
Expand Up @@ -451,9 +451,10 @@ Throwable.TraceInfo defaultTraceHandler( void* ptr = null )

for( int i = FIRSTFRAME; i < numframes; ++i )
{
char[4096] fixbuf;
auto buf = framelist[i][0 .. strlen(framelist[i])];
auto pos = cast(size_t)(i - FIRSTFRAME);
buf = fixline( buf );
buf = fixline( buf, fixbuf );
ret = dg( pos, buf );
if( ret )
break;
Expand All @@ -474,8 +475,7 @@ Throwable.TraceInfo defaultTraceHandler( void* ptr = null )
char** framelist;

private:
char[4096] fixbuf;
char[] fixline( char[] buf )
const(char)[] fixline( const(char)[] buf, ref char[4096] fixbuf ) const
{
version( OSX )
{
Expand Down
14 changes: 7 additions & 7 deletions src/object_.d
Expand Up @@ -445,7 +445,7 @@ class TypeInfo_Vector : TypeInfo
override @property size_t tsize() nothrow pure { return base.tsize; }
override void swap(void* p1, void* p2) { return base.swap(p1, p2); }

override @property const(TypeInfo) next() nothrow pure { return base.next; }
override @property const(TypeInfo) next() nothrow pure const { return base.next; }
override @property uint flags() nothrow pure { return base.flags; }
override const(void)[] init() nothrow pure { return base.init(); }

Expand Down Expand Up @@ -477,7 +477,7 @@ class TypeInfo_Typedef : TypeInfo
override @property size_t tsize() nothrow pure { return base.tsize; }
override void swap(void* p1, void* p2) { return base.swap(p1, p2); }

override @property const(TypeInfo) next() nothrow pure { return base.next; }
override @property const(TypeInfo) next() nothrow pure const { return base.next; }
override @property uint flags() nothrow pure { return base.flags; }
override const(void)[] init() nothrow pure const @safe { return m_init.length ? m_init : base.init(); }

Expand Down Expand Up @@ -544,7 +544,7 @@ class TypeInfo_Pointer : TypeInfo
*cast(void**)p2 = tmp;
}

override @property const(TypeInfo) next() nothrow pure { return m_next; }
override @property const(TypeInfo) next() nothrow pure const { return m_next; }
override @property uint flags() nothrow pure { return 1; }

TypeInfo m_next;
Expand Down Expand Up @@ -615,7 +615,7 @@ class TypeInfo_Array : TypeInfo

TypeInfo value;

override @property const(TypeInfo) next() nothrow pure
override @property const(TypeInfo) next() nothrow pure const
{
return value;
}
Expand Down Expand Up @@ -715,7 +715,7 @@ class TypeInfo_StaticArray : TypeInfo
}

override const(void)[] init() nothrow pure { return value.init(); }
override @property const(TypeInfo) next() nothrow pure { return value; }
override @property const(TypeInfo) next() nothrow pure const { return value; }
override @property uint flags() nothrow pure { return value.flags; }

override void destroy(void* p)
Expand Down Expand Up @@ -777,7 +777,7 @@ class TypeInfo_AssociativeArray : TypeInfo
return (char[int]).sizeof;
}

override @property const(TypeInfo) next() nothrow pure { return value; }
override @property const(TypeInfo) next() nothrow pure const { return value; }
override @property uint flags() nothrow pure { return 1; }

TypeInfo value;
Expand Down Expand Up @@ -1298,7 +1298,7 @@ class TypeInfo_Const : TypeInfo
override @property size_t tsize() nothrow pure { return base.tsize; }
override void swap(void *p1, void *p2) { return base.swap(p1, p2); }

override @property const(TypeInfo) next() nothrow pure { return base.next; }
override @property const(TypeInfo) next() nothrow pure const { return base.next; }
override @property uint flags() nothrow pure { return base.flags; }
override const(void)[] init() nothrow pure { return base.init(); }

Expand Down

0 comments on commit 56c371c

Please sign in to comment.