From 174205bcae62e3c954096a2ff557ad2184ad9817 Mon Sep 17 00:00:00 2001 From: mjendrusch Date: Sun, 17 Apr 2016 17:10:24 +0200 Subject: [PATCH] Fixes #4093 Added COMMA macro to nimbase.h, changed code generation for c++ template types to insert COMMA im between the arguments, instead of ",". --- compiler/ccgtypes.nim | 2 +- lib/nimbase.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim index 39f16ff0dc..ab40fff735 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 5a4f403b62..f531f3c490 100644 --- a/lib/nimbase.h +++ b/lib/nimbase.h @@ -222,6 +222,8 @@ __clang__ /* ----------------------------------------------------------------------- */ +#define COMMA , + #include #include