about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2025-05-01 16:14:32 +0200
committerbptato <nincsnevem662@gmail.com>2025-05-01 16:14:32 +0200
commit6d7ba989361cd307c84264611dc8987dc3cb9707 (patch)
tree8da38dffc15925bbd199c3e07c1105facbd71eee
parent25cb585ed6ecfc7f4b2a6cdb2e2b52258ddb9144 (diff)
downloadchawan-6d7ba989361cd307c84264611dc8987dc3cb9707.tar.gz
myaddr: fix newSeqUninit polyfill
Sometimes it's called with an unsigned len.

ref. https://todo.sr.ht/~bptato/chawan/59
-rw-r--r--src/utils/myaddr.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/myaddr.nim b/src/utils/myaddr.nim
index 425662c3..dc0e0911 100644
--- a/src/utils/myaddr.nim
+++ b/src/utils/myaddr.nim
@@ -19,5 +19,5 @@ template addr(x: var auto): auto {.used.} =
   system.addr x
 
 when not declared(newSeqUninit):
-  template newSeqUninit[T](len: int): seq[T] =
+  template newSeqUninit[T](len: typed): seq[T] {.used.} =
     newSeqUninitialized[T](len)