switch on

This commit is contained in:
ringabout
2023-12-11 14:12:47 +00:00
committed by GitHub
parent 68bf6c7f93
commit f1a7bfce47
4 changed files with 11 additions and 8 deletions

View File

@@ -144,7 +144,7 @@ proc nimToCStringConv(s: NimStringV3): cstring {.compilerproc, nonReloadable, in
else:
## TODO: fixme: inject conversions somewhere else and be cleaned up
## but let it leak for now
let len = s.nimStrLenV3+1
let len = s.nimStrLenV3
result = cast[cstring](allocShared0(len+1))
copyMem(result, unsafeAddr s.p[0], len)