diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-11-16 17:22:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-16 10:22:51 +0100 |
commit | 06cd15663d6aed6cbf03a265f546043c47f250d4 (patch) | |
tree | 644bcc378c2a044655df58a91058b7c73e478d06 /lib/system/excpt.nim | |
parent | 3d692d08f74e41588fa157b006e882f142bd77d4 (diff) | |
download | Nim-06cd15663d6aed6cbf03a265f546043c47f250d4.tar.gz |
fixes ptr to cstring warnings[backport] (#20848)
* fix =#13790 ptr char (+friends) should not implicitly convert to cstring * Apply suggestions from code review * first round; compiles on windows * nimPreviewSlimSystem * conversion is unsafe, cast needed * fixes more tests * fixes asyncnet * another try another error * last one * true * one more * why bugs didn't show at once * add `nimPreviewCstringConversion` switch * typo * fixes ptr to cstring warnings[backport] * add fixes Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
Diffstat (limited to 'lib/system/excpt.nim')
-rw-r--r-- | lib/system/excpt.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim index c76be554f..86cfff9cd 100644 --- a/lib/system/excpt.nim +++ b/lib/system/excpt.nim @@ -397,9 +397,9 @@ proc reportUnhandledErrorAux(e: ref Exception) {.nodestroy, gcsafe.} = xadd(buf, e.name, e.name.len) add(buf, "]\n") if onUnhandledException != nil: - onUnhandledException($buf.addr) + onUnhandledException($cast[cstring](buf.addr)) else: - showErrorMessage(buf.addr, L) + showErrorMessage(cast[cstring](buf.addr), L) proc reportUnhandledError(e: ref Exception) {.nodestroy, gcsafe.} = if unhandledExceptionHook != nil: |