store typeinfo also in local hash table to prevent multiple 'extern' declarations in the generated C code
This commit is contained in:
parent
4d22cff8ea
commit
94e1488c24
1 changed files with 4 additions and 0 deletions
|
|
@ -1089,6 +1089,10 @@ proc genTypeInfo(m: BModule, t: PType): Rope =
|
||||||
discard cgsym(m, "TNimNode")
|
discard cgsym(m, "TNimNode")
|
||||||
addf(m.s[cfsVars], "extern TNimType $1; /* $2 */$n",
|
addf(m.s[cfsVars], "extern TNimType $1; /* $2 */$n",
|
||||||
[result, rope(typeToString(t))])
|
[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
|
return "(&".rope & result & ")".rope
|
||||||
|
|
||||||
result = "NTI$1" % [rope($sig)]
|
result = "NTI$1" % [rope($sig)]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue