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

Commit

Permalink
Fixed a couple of places where ti.next was still being used.
Browse files Browse the repository at this point in the history
Also fixed a minor issue with an import.
  • Loading branch information
Orvid committed Dec 12, 2014
1 parent c424346 commit f8e9bfb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 1 addition & 5 deletions src/core/memory.d
Expand Up @@ -762,8 +762,4 @@ struct GC
}
}

void callStructDtorsDuringGC(bool callThem)
{
static import rt.lifetime;
rt.lifetime.callStructDtorsDuringGC = callThem;
}
__gshared bool callStructDtorsDuringGC = true;
6 changes: 2 additions & 4 deletions src/rt/lifetime.d
Expand Up @@ -1093,7 +1093,7 @@ extern (C) void* _d_newitemT(TypeInfo ti)
memset(ptr, 0, size);

if (needsTypeInfo)
*cast(TypeInfo*)(ptr + GC.sizeOf(ptr) - size_t.sizeof) = ti.next;
*cast(TypeInfo*)(ptr + GC.sizeOf(ptr) - size_t.sizeof) = ti;

return ptr;
//}
Expand Down Expand Up @@ -1136,7 +1136,7 @@ extern (C) void* _d_newitemiT(TypeInfo ti)
memcpy(ptr, q, isize);

if (needsTypeInfo)
*cast(TypeInfo*)(ptr + GC.sizeOf(ptr) - size_t.sizeof) = ti.next;
*cast(TypeInfo*)(ptr + GC.sizeOf(ptr) - size_t.sizeof) = ti;
return ptr;
//}
}
Expand Down Expand Up @@ -1279,8 +1279,6 @@ extern (C) int rt_hasFinalizerInSegment(void* p, in void[] segment) nothrow
return false;
}

__gshared bool callStructDtorsDuringGC = true;

extern (C) int rt_hasStructFinalizerInSegment(void* p, in void[] segment) nothrow
{
if(!p)
Expand Down

0 comments on commit f8e9bfb

Please sign in to comment.