This commit is contained in:
Andreas Rumpf 2021-04-07 23:26:53 +02:00 • committed by GitHub
commit bd7807de4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 22 deletions

View file

@ -209,7 +209,7 @@ when not defined(js) and (defined(hotcodereloading) or
else: "so"
type
HcrProcGetter* = proc (libHandle: pointer, procName: cstring): pointer {.nimcall.}
HcrGcMarkerProc = proc () {.nimcall.}
HcrGcMarkerProc = proc () {.nimcall, raises: [].}
HcrModuleInitializer* = proc () {.nimcall.}
when defined(createNimHcr):
@ -606,7 +606,7 @@ when defined(createNimHcr):
proc hcrGeneration*(): int {.nimhcr.} =
generation
proc hcrMarkGlobals*() {.nimhcr, nimcall, gcsafe.} =
proc hcrMarkGlobals*() {.compilerproc, exportc, dynlib, nimcall, gcsafe.} =
# This is gcsafe, because it will be registered
# only in the GC of the main thread.
{.gcsafe.}:
@ -648,10 +648,10 @@ elif defined(hotcodereloading) or defined(testNimHcr):
proc hcrAddEventHandler*(isBefore: bool, cb: proc ()) {.nimhcr.}
proc hcrMarkGlobals*() {.nimhcr, nimcall, gcsafe.}
proc hcrMarkGlobals*() {.raises: [], nimhcr, nimcall, gcsafe.}
when declared(nimRegisterGlobalMarker):
nimRegisterGlobalMarker(hcrMarkGlobals)
nimRegisterGlobalMarker(cast[GlobalMarkerProc](hcrMarkGlobals))
else:
proc hcrHasModuleChanged*(moduleHash: string): bool =