diff options
author | Jacek Sieka <arnetheduck@gmail.com> | 2019-04-23 04:10:33 -0600 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-04-23 12:10:33 +0200 |
commit | 9d5e8e55f9bc85d4ded67da141a682e594f02f90 (patch) | |
tree | 363e547c5344a4843fbc34abc2e4877a2eaaafea | |
parent | 2cdff617fd77c0e8186710a03dbd3c6d646f667f (diff) | |
download | Nim-9d5e8e55f9bc85d4ded67da141a682e594f02f90.tar.gz |
deprecate programResult, avoid exposing in standalone mode (#11075)
-rw-r--r-- | lib/system.nim | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/system.nim b/lib/system.nim index 182403e82..2e4862629 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -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.} |