summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAmjad Ben Hedhili <amjadhedhili@outlook.com>2023-09-23 10:39:11 +0100
committerGitHub <noreply@github.com>2023-09-23 11:39:11 +0200
commitb10a809274494d46db2b6bf6930c8c50a2751c9b (patch)
tree8848464a5f5a8b14638aa6a8e279dca29bfc3001 /lib
parentc0838826c0071e9bf9a456a82b237b63f21f2b12 (diff)
downloadNim-b10a809274494d46db2b6bf6930c8c50a2751c9b.tar.gz
Make `newStringUninit` available on the js backend [backport] (#22743)
Diffstat (limited to 'lib')
-rw-r--r--lib/system.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 8cd526bd0..97d9d72ad 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -1643,6 +1643,9 @@ when not defined(js):
     else:
       var s = cast[PGenericSeq](result)
       s.len = len
+else:
+  proc newStringUninit*(len: Natural): string {.
+    magic: "NewString", importc: "mnewString", noSideEffect.}
 
 {.pop.}