mirror of
https://github.com/dlang/phobos.git
synced 2025-04-26 05:00:35 +03:00
so it works with compiler changes
This commit is contained in:
parent
3ea3ec6c8c
commit
1f763bca8d
2 changed files with 25 additions and 20 deletions
|
@ -234,7 +234,7 @@ class GC
|
|||
|
||||
void initialize()
|
||||
{
|
||||
//printf("GC.initialize(), this = %p\n", this);
|
||||
//printf("GC.initialize(), this = %p\n", this);
|
||||
gcLock = GCLock.classinfo;
|
||||
gcx = cast(Gcx *)cstdlib.calloc(1, Gcx.sizeof);
|
||||
if (!gcx)
|
||||
|
@ -964,13 +964,13 @@ class GC
|
|||
gcx.addRange(pbot, ptop);
|
||||
}
|
||||
else
|
||||
{
|
||||
//printf("sync gcLock %p, classinit = %p, this = %p\n", gcLock, GCLock.classinfo, this);
|
||||
synchronized (gcLock)
|
||||
{
|
||||
gcx.addRange(pbot, ptop);
|
||||
}
|
||||
}
|
||||
{
|
||||
//printf("sync gcLock %p, classinit = %p, this = %p\n", gcLock, GCLock.classinfo, this);
|
||||
synchronized (gcLock)
|
||||
{
|
||||
gcx.addRange(pbot, ptop);
|
||||
}
|
||||
}
|
||||
//debug(PRINTF) printf("-GC.addRange()\n");
|
||||
}
|
||||
|
||||
|
@ -1604,15 +1604,15 @@ struct Gcx
|
|||
memmove(pooltable + n,
|
||||
pooltable + n + 1,
|
||||
(--npools - n) * (Pool*).sizeof);
|
||||
if (npools)
|
||||
{
|
||||
minAddr = pooltable[0].baseAddr;
|
||||
maxAddr = pooltable[npools - 1].topAddr;
|
||||
}
|
||||
else
|
||||
{ minAddr = null;
|
||||
maxAddr = null;
|
||||
}
|
||||
if (npools)
|
||||
{
|
||||
minAddr = pooltable[0].baseAddr;
|
||||
maxAddr = pooltable[npools - 1].topAddr;
|
||||
}
|
||||
else
|
||||
{ minAddr = null;
|
||||
maxAddr = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2733,6 +2733,11 @@ struct Pool
|
|||
else
|
||||
return cast(int)(baseAddr > p2.baseAddr);
|
||||
}
|
||||
|
||||
int opEquals(Pool *p2)
|
||||
{
|
||||
return baseAddr == p2.baseAddr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -333,7 +333,7 @@ struct Box
|
|||
* Compare this box's value with another box. This implicitly casts if the
|
||||
* types are different, identical to the regular type system.
|
||||
*/
|
||||
bool opEquals(Box other)
|
||||
int opEquals(Box other)
|
||||
{
|
||||
return opEqualsInternal(other, false);
|
||||
}
|
||||
|
@ -388,9 +388,9 @@ struct Box
|
|||
* Compare this box's value with another box. This implicitly casts if the
|
||||
* types are different, identical to the regular type system.
|
||||
*/
|
||||
float opCmp(Box other)
|
||||
int opCmp(Box other)
|
||||
{
|
||||
return opCmpInternal(other, false);
|
||||
return cast(int)opCmpInternal(other, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue