diff options
author | mjendrusch <Jendrusch@stud.uni-heidelberg.de> | 2016-04-17 17:10:24 +0200 |
---|---|---|
committer | mjendrusch <Jendrusch@stud.uni-heidelberg.de> | 2016-04-17 17:10:24 +0200 |
commit | 174205bcae62e3c954096a2ff557ad2184ad9817 (patch) | |
tree | 8ae8a4808fe2d748364ab014d5cf206fa3bfd6f7 | |
parent | 7f7fc35a0edbe94056a5ad8c442c577f0a1ce7be (diff) | |
download | Nim-174205bcae62e3c954096a2ff557ad2184ad9817.tar.gz |
Fixes #4093
Added COMMA macro to nimbase.h, changed code generation for c++ template types to insert COMMA im between the arguments, instead of ",".
-rw-r--r-- | compiler/ccgtypes.nim | 2 | ||||
-rw-r--r-- | lib/nimbase.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim index 39f16ff0d..ab40fff73 100644 --- a/compiler/ccgtypes.nim +++ b/compiler/ccgtypes.nim @@ -654,7 +654,7 @@ proc getTypeDescAux(m: BModule, typ: PType, check: var IntSet): Rope = else: result = cppName & "<" for i in 1 .. typ.len-2: - if i > 1: result.add(", ") + if i > 1: result.add(" COMMA ") result.add(getTypeDescAux(m, typ.sons[i], check)) result.add("> ") # always call for sideeffects: diff --git a/lib/nimbase.h b/lib/nimbase.h index 5a4f403b6..f531f3c49 100644 --- a/lib/nimbase.h +++ b/lib/nimbase.h @@ -222,6 +222,8 @@ __clang__ /* ----------------------------------------------------------------------- */ +#define COMMA , + #include <limits.h> #include <stddef.h> |