Explicitly convert cstring to string (#25961)

I was updating nim to 2.2.10 in nixpkgs 

https://github.com/NixOS/nixpkgs/pull/538469

and without this change the fail build, because add(string, cstring) is
not defined. I think it's caused by a change of position of the includes
in system, but with this it works fine.

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
leiserfg
2026-07-06 17:07:04 +02:00
committed by GitHub
parent c70a4502d2
commit a58e07b336

View File

@@ -207,10 +207,10 @@ when defined(nativeStacktrace) and nativeStackTraceSupported:
if enabled:
if dlresult != 0:
var oldLen = s.len
add(s, tempDlInfo.dli_fname)
add(s, cstrToStrBuiltin(tempDlInfo.dli_fname))
if tempDlInfo.dli_sname != nil:
for k in 1..max(1, 25-(s.len-oldLen)): add(s, ' ')
add(s, tempDlInfo.dli_sname)
add(s, cstrToStrBuiltin(tempDlInfo.dli_sname))
else:
add(s, '?')
add(s, "\n")