Add revert as panicoverride :)

This commit is contained in:
Jacques Wagener 2019-06-25 14:22:35 +02:00
parent ccf2de73e8
commit c90f37ca5c
No known key found for this signature in database
GPG Key ID: C294D1025DA0E923
1 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,6 @@
{.push stack_trace: off, profiler:off.}
proc rawoutput(s: string) = discard
proc revert(dataOffset: pointer; length: int32) {.noreturn, cdecl, importc.}
proc rawoutput(s: string) =
revert(cstring(s), s.len.int32)
proc panic(s: string) = rawoutput(s)
{.pop.}