mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
store typeinfo also in local hash table to prevent multiple 'extern' declarations in the generated C code
This commit is contained in:
@@ -1089,6 +1089,10 @@ proc genTypeInfo(m: BModule, t: PType): Rope =
|
||||
discard cgsym(m, "TNimNode")
|
||||
addf(m.s[cfsVars], "extern TNimType $1; /* $2 */$n",
|
||||
[result, rope(typeToString(t))])
|
||||
#return "(&".rope & result & ")".rope
|
||||
#result = "NTI$1" % [rope($sig)]
|
||||
# also store in local type section:
|
||||
m.typeInfoMarker[sig] = result
|
||||
return "(&".rope & result & ")".rope
|
||||
|
||||
result = "NTI$1" % [rope($sig)]
|
||||
|
||||
Reference in New Issue
Block a user