deprecate programResult, avoid exposing in standalone mode (#11075)

This commit is contained in:
Jacek Sieka 2019-04-23 04:10:33 -06:00 • committed by Andreas Rumpf
commit 9d5e8e55f9

View file

@ -1926,13 +1926,11 @@ const
## failure. ## failure.
when defined(nodejs) and not defined(nimscript): when defined(nodejs) and not defined(nimscript):
var programResult* {.importc: "process.exitCode".}: int var programResult* {.importc: "process.exitCode", deprecated.}: int
programResult = 0 programResult = 0
else: elif hostOS != "standalone":
var programResult* {.compilerproc, exportc: "nim_program_result".}: int var programResult* {.compilerproc, exportc: "nim_program_result", deprecated.}: int
## Modify this variable to specify the exit code of the program ## deprecated, prefer ``quit``
## under normal circumstances. When the program is terminated
## prematurely using `quit proc <#quit,int>`_, this value is ignored.
when defined(nimdoc): when defined(nimdoc):
proc quit*(errorcode: int = QuitSuccess) {.magic: "Exit", noreturn.} proc quit*(errorcode: int = QuitSuccess) {.magic: "Exit", noreturn.}