Skip to content

Commit

Permalink
Merge pull request #21 from Geod24/druntime-pr-2645
Browse files Browse the repository at this point in the history
Support for Druntime PR 2645
  • Loading branch information
EyalIO authored Jun 18, 2019
2 parents b36254e + 7ba5394 commit 503eac6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/mecca/lib/exception.d
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,19 @@ import mecca.lib.string : nogcFormat, nogcRtFormat;

private bool _assertInProgress;

// The default TraceInfo provided by DMD is not `@nogc`
private extern(C) nothrow @nogc {
int backtrace(void** buffer, int size);

static if (__VERSION__ < 2077) {
pragma(mangle, "_D4core7runtime19defaultTraceHandlerFPvZ16DefaultTraceInfo6__ctorMFZC4core7runtime19defaultTraceHandlerFPvZ16DefaultTraceInfo")
void defaultTraceInfoCtor(Object);
} else {
} else static if (__VERSION__ < 2087) {
pragma(mangle, "_D4core7runtime19defaultTraceHandlerFPvZ16DefaultTraceInfo6__ctorMFZCQCpQCnQCiFQBqZQBr")
void defaultTraceInfoCtor(Object);
} else {
pragma(mangle, "_D4core7runtime16DefaultTraceInfo6__ctorMFZCQBqQBoQBj")
void defaultTraceInfoCtor(Object);
}
}
private __gshared static TypeInfo_Class defaultTraceTypeInfo;
Expand Down Expand Up @@ -702,8 +706,3 @@ unittest {
// double close will throw
assertThrows!ErrnoException(errnoCall!close(newFd));
}





0 comments on commit 503eac6

Please sign in to comment.