Add noQuit option (#19419) [backport:1.6]
* Add noQuit option * Add nim prefix in case of conflicts Co-authored-by: flywind <xzsflywind@gmail.com> Co-authored-by: flywind <xzsflywind@gmail.com>
This commit is contained in:
parent
08261cb9e3
commit
ce44cf03cc
1 changed files with 5 additions and 2 deletions
|
|
@ -1198,8 +1198,8 @@ proc align(address, alignment: int): int =
|
||||||
else:
|
else:
|
||||||
result = (address + (alignment - 1)) and not (alignment - 1)
|
result = (address + (alignment - 1)) and not (alignment - 1)
|
||||||
|
|
||||||
when defined(nimdoc):
|
when defined(nimNoQuit):
|
||||||
proc quit*(errorcode: int = QuitSuccess) {.magic: "Exit", noreturn.}
|
proc quit*(errorcode: int = QuitSuccess) = discard "ignoring quit"
|
||||||
## Stops the program immediately with an exit code.
|
## Stops the program immediately with an exit code.
|
||||||
##
|
##
|
||||||
## Before stopping the program the "exit procedures" are called in the
|
## Before stopping the program the "exit procedures" are called in the
|
||||||
|
|
@ -1223,6 +1223,9 @@ when defined(nimdoc):
|
||||||
## It does *not* call the garbage collector to free all the memory,
|
## It does *not* call the garbage collector to free all the memory,
|
||||||
## unless an `addExitProc` proc calls `GC_fullCollect <#GC_fullCollect>`_.
|
## unless an `addExitProc` proc calls `GC_fullCollect <#GC_fullCollect>`_.
|
||||||
|
|
||||||
|
elif defined(nimdoc):
|
||||||
|
proc quit*(errorcode: int = QuitSuccess) {.magic: "Exit", noreturn.}
|
||||||
|
|
||||||
elif defined(genode):
|
elif defined(genode):
|
||||||
include genode/env
|
include genode/env
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue