make parseopt work with DLLs on Unix

This commit is contained in:
Araq 2018-08-28 12:54:40 +02:00
commit a42150f9a8

View file

@ -227,7 +227,8 @@ proc next*(p: var OptParser) {.rtl, extern: "npo$1".} =
inc p.idx inc p.idx
p.pos = 0 p.pos = 0
proc cmdLineRest*(p: OptParser): TaintedString {.rtl, extern: "npo$1".} = when declared(os.paramCount):
proc cmdLineRest*(p: OptParser): TaintedString {.rtl, extern: "npo$1".} =
## retrieves the rest of the command line that has not been parsed yet. ## retrieves the rest of the command line that has not been parsed yet.
var res = "" var res = ""
for i in p.idx..<p.cmds.len: for i in p.idx..<p.cmds.len: