Commit bde894cff21da12c3cc319f44378847ed0a0a10f
1 parent
53b6fbaa
solve the name mangling issue in Nim
Showing
1 changed file
with
1 additions
and
5 deletions
src/squeaknim.nim
@@ -129,11 +129,7 @@ macro exportSt*(body: stmt): stmt = | @@ -129,11 +129,7 @@ macro exportSt*(body: stmt): stmt = | ||
129 | # <apicall: long 'system' (char*) module: 'libSystem.dylib'> | 129 | # <apicall: long 'system' (char*) module: 'libSystem.dylib'> |
130 | # ^self externalCallFailed. | 130 | # ^self externalCallFailed. |
131 | result = body | 131 | result = body |
132 | - when defined(cpp): | ||
133 | - result[pragmaPos].add(ident"exportc", ident"dynlib", ident"cdecl", | ||
134 | - newColonExpr(ident"codegenDecl", newLit"""extern "C" $# $#$#""")) | ||
135 | - else: | ||
136 | - result[pragmaPos].add(ident"exportc", ident"dynlib", ident"cdecl") | 132 | + result[pragmaPos].add(ident"exportc", ident"dynlib", ident"cdecl") |
137 | let params = result[paramPos] | 133 | let params = result[paramPos] |
138 | let procName = $result[0] | 134 | let procName = $result[0] |
139 | var st = procName | 135 | var st = procName |