summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorVarriount <Varriount@users.noreply.github.com>2015-11-11 15:18:13 -0500
committerVarriount <Varriount@users.noreply.github.com>2015-11-11 15:18:13 -0500
commit3832ea078511ba3b0575669969563cb6ef1ea368 (patch)
tree1cf0f226b90fecbe7d189cbf2065e84d9887d903
parent29fd3edb9cf15146dae18bcdc74ae08bb0b1d86e (diff)
downloadNim-3832ea078511ba3b0575669969563cb6ef1ea368.tar.gz
Prevent Exported C procedure collisions
Prevents collisions between those C externalized procedures in parseopt and parseopt2.
-rw-r--r--lib/pure/parseopt2.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/parseopt2.nim b/lib/pure/parseopt2.nim
index 73b498fe0..7fd9c60fe 100644
--- a/lib/pure/parseopt2.nim
+++ b/lib/pure/parseopt2.nim
@@ -70,7 +70,7 @@ when not defined(createNimRtl):
     ## Initializes option parser from current command line arguments.
     return initOptParser(commandLineParams())
 
-proc next*(p: var OptParser) {.rtl, extern: "npo$1".}
+proc next*(p: var OptParser) {.rtl, extern: "npo2$1".}
 
 proc nextOption(p: var OptParser, token: string, allowEmpty: bool) =
   for splitchar in [':', '=']:
@@ -113,7 +113,7 @@ proc next(p: var OptParser) =
     p.key = token
     p.val = ""
 
-proc cmdLineRest*(p: OptParser): TaintedString {.rtl, extern: "npo$1", deprecated.} =
+proc cmdLineRest*(p: OptParser): TaintedString {.rtl, extern: "npo2$1", deprecated.} =
   ## Returns part of command line string that has not been parsed yet.
   ## Do not use - does not correctly handle whitespace.
   return p.cmd[p.pos..p.cmd.len-1].join(" ")