From 06dfd316127fb2ec05ff69942abd1e279156ac5c Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Tue, 12 May 2020 15:46:24 +0200 Subject: fixes #13881 * fixes #13881 * documented changed requirements for system.onThreadDestruction * destructors.rst: update the documentation --- lib/system.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/system.nim') diff --git a/lib/system.nim b/lib/system.nim index 8878277b7..8ce79aa2f 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -692,7 +692,7 @@ proc len*(x: string): int {.magic: "LengthStr", noSideEffect.} proc len*(x: cstring): int {.magic: "LengthStr", noSideEffect.} ## Returns the length of a compatible string. This is sometimes ## an O(n) operation. - ## + ## ## **Note:** On the JS backend this currently counts UTF-16 code points ## instead of bytes at runtime (not at compile time). For now, if you ## need the byte length of the UTF-8 encoding, convert to string with @@ -2093,7 +2093,7 @@ when not defined(js): when hasAlloc: when not defined(gcRegions) and not usesDestructors: - proc initGC() {.gcsafe.} + proc initGC() {.gcsafe, raises: [].} proc initStackBottom() {.inline, compilerproc.} = # WARNING: This is very fragile! An array size of 8 does not work on my -- cgit 1.4.1-2-gfad0