Showing with 8 additions and 0 deletions.
  1. +8 −0 src/gcstub/gc.d
8 changes: 8 additions & 0 deletions src/gcstub/gc.d
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ private

extern (C) void function(void*) gc_removeRoot;
extern (C) void function(void*) gc_removeRange;
extern (C) void function(in void[]) gc_runFinalizers;
}

__gshared Proxy pthis;
Expand Down Expand Up @@ -112,6 +113,7 @@ private

pthis.gc_removeRoot = &gc_removeRoot;
pthis.gc_removeRange = &gc_removeRange;
pthis.gc_runFinalizers = &gc_runFinalizers;
}

__gshared void** roots = null;
Expand Down Expand Up @@ -353,6 +355,12 @@ extern (C) void gc_removeRange( void *p )
return proxy.gc_removeRange( p );
}

extern (C) void gc_runFinalizers( in void[] segment )
{
if( proxy !is null )
proxy.gc_runFinalizers( segment );
}

extern (C) Proxy* gc_getProxy()
{
return &pthis;
Expand Down