newruntime: make dynamic destructors compatible with C++

This commit is contained in:
Andreas Rumpf 2019-03-15 11:18:05 +01:00
commit 831626be85
2 changed files with 4 additions and 3 deletions

View file

@ -1255,7 +1255,7 @@ proc genObjectInfoV2(m: BModule, t, origType: PType, name: Rope; info: TLineInfo
else:
d = rope("NIM_NIL")
addf(m.s[cfsVars], "TNimType $1;$n", [name])
addf(m.s[cfsTypeInit3], "$1.destructor = $2; $1.size = sizeof($3); $1.name = $4;$n", [
addf(m.s[cfsTypeInit3], "$1.destructor = (void*)$2; $1.size = sizeof($3); $1.name = $4;$n", [
name, d, getTypeDesc(m, t), genTypeInfo2Name(m, t)])
proc genTypeInfo(m: BModule, t: PType; info: TLineInfo): Rope =