gc:destructors further progress

This commit is contained in:
Andreas Rumpf 2018-11-29 01:13:24 +01:00
commit 7d82df20be
6 changed files with 52 additions and 24 deletions

View file

@ -54,7 +54,7 @@ proc genStringLiteralV1(m: BModule; n: PNode): Rope =
proc genStringLiteralDataOnlyV2(m: BModule, s: string): Rope =
result = getTempName(m)
addf(m.s[cfsData], "static const struct {$n" &
" NI cap; void* allocator; NIM_CHAR data[$2];$n" &
" NI cap; void* allocator; NIM_CHAR data[$2+1];$n" &
"} $1 = { $2, NIM_NIL, $3 };$n",
[result, rope(len(s)), makeCString(s)])