mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-01 21:19:03 +00:00
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>
(cherry picked from commit a58e07b336)
This commit is contained in:
@@ -211,10 +211,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")
|
||||
|
||||
Reference in New Issue
Block a user