diff options
Diffstat (limited to 'libphobos/libdruntime/rt/dmain2.d')
-rw-r--r-- | libphobos/libdruntime/rt/dmain2.d | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libphobos/libdruntime/rt/dmain2.d b/libphobos/libdruntime/rt/dmain2.d index 264fdf6..8a10aac 100644 --- a/libphobos/libdruntime/rt/dmain2.d +++ b/libphobos/libdruntime/rt/dmain2.d @@ -182,6 +182,7 @@ extern (C) int rt_term() */ alias Throwable.TraceInfo function(void* ptr) TraceHandler; private __gshared TraceHandler traceHandler = null; +private __gshared Throwable.TraceDeallocator traceDeallocator = null; /** @@ -189,10 +190,12 @@ private __gshared TraceHandler traceHandler = null; * * Params: * h = The new trace handler. Set to null to use the default handler. + * d = The new dealloactor to use. */ -extern (C) void rt_setTraceHandler(TraceHandler h) +extern (C) void rt_setTraceHandler(TraceHandler h, Throwable.TraceDeallocator d = null) { traceHandler = h; + traceDeallocator = d; } /** @@ -203,6 +206,11 @@ extern (C) TraceHandler rt_getTraceHandler() return traceHandler; } +extern (C) Throwable.TraceDeallocator rt_getTraceDeallocator() +{ + return traceDeallocator; +} + /** * This function will be called when an exception is constructed. The * user-supplied trace handler will be called if one has been supplied, |