diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-05-01 10:48:46 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-05-02 13:34:53 +0200 |
commit | 599b5d6dcbd8b73d98d1aaf2de94d3360229a699 (patch) | |
tree | 16dd2abe40bb595864a330dad860b91c6b26da6d /lib | |
parent | cc0ca43743f286d93c0e4b7adddecd7bb3e83e46 (diff) | |
download | Nim-599b5d6dcbd8b73d98d1aaf2de94d3360229a699.tar.gz |
make 'not nil' experimental
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system.nim | 2 | ||||
-rw-r--r-- | lib/system/excpt.nim | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/system.nim b/lib/system.nim index 5c0970f85..0c8659fda 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -3223,7 +3223,7 @@ when not defined(JS): #and not defined(nimscript): when declared(initGC): initGC() when not defined(nimscript): - proc setControlCHook*(hook: proc () {.noconv.} not nil) + proc setControlCHook*(hook: proc () {.noconv.}) ## allows you to override the behaviour of your application when CTRL+C ## is pressed. Only one such hook is supported. diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim index afeab2b6c..fb38948f7 100644 --- a/lib/system/excpt.nim +++ b/lib/system/excpt.nim @@ -56,7 +56,7 @@ var # list of exception handlers # a global variable for the root of all try blocks currException {.threadvar.}: ref Exception - raise_counter {.threadvar.}: uint + raise_counter {.threadvar.}: uint gcFramePtr {.threadvar.}: GcFrame @@ -126,10 +126,10 @@ proc popCurrentExceptionEx(id: uint) {.compilerRtl.} = while cur != nil and cur.raise_id != id: prev = cur cur = cur.up - if cur == nil: + if cur == nil: showErrorMessage("popCurrentExceptionEx() exception was not found in the exception stack. Aborting...") quitOrDebug() - prev.up = cur.up + prev.up = cur.up # some platforms have native support for stack traces: const @@ -503,7 +503,7 @@ when not defined(noSignalHandler) and not defined(useNimRtl): registerSignalHandler() # call it in initialization section -proc setControlCHook(hook: proc () {.noconv.} not nil) = +proc setControlCHook(hook: proc () {.noconv.}) = # ugly cast, but should work on all architectures: type SignalHandler = proc (sign: cint) {.noconv, benign.} c_signal(SIGINT, cast[SignalHandler](hook)) |