mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 02:42:05 +00:00
deprecate programResult, avoid exposing in standalone mode (#11075)
This commit is contained in:
committed by
Andreas Rumpf
parent
2cdff617fd
commit
9d5e8e55f9
@@ -1926,13 +1926,11 @@ const
|
||||
## failure.
|
||||
|
||||
when defined(nodejs) and not defined(nimscript):
|
||||
var programResult* {.importc: "process.exitCode".}: int
|
||||
var programResult* {.importc: "process.exitCode", deprecated.}: int
|
||||
programResult = 0
|
||||
else:
|
||||
var programResult* {.compilerproc, exportc: "nim_program_result".}: int
|
||||
## Modify this variable to specify the exit code of the program
|
||||
## under normal circumstances. When the program is terminated
|
||||
## prematurely using `quit proc <#quit,int>`_, this value is ignored.
|
||||
elif hostOS != "standalone":
|
||||
var programResult* {.compilerproc, exportc: "nim_program_result", deprecated.}: int
|
||||
## deprecated, prefer ``quit``
|
||||
|
||||
when defined(nimdoc):
|
||||
proc quit*(errorcode: int = QuitSuccess) {.magic: "Exit", noreturn.}
|
||||
|
||||
Reference in New Issue
Block a user