summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSirOlaf <34164198+SirOlaf@users.noreply.github.com>2023-09-24 20:47:56 +0200
committerGitHub <noreply@github.com>2023-09-24 20:47:56 +0200
commit1b0447c208a8ec03c1abf5c511b3949a882a8996 (patch)
tree4e5d91241b99fa63fafbdcb8ab7c385bdeb7077e
parenta6c281bd1d6e47fb8d137008e6ba944b8b2eb9a3 (diff)
downloadNim-1b0447c208a8ec03c1abf5c511b3949a882a8996.tar.gz
Add magic toOpenArrayChar (#22751)
Should help with stuff like the checksums package which only takes
`openArray[char]`

Co-authored-by: SirOlaf <>
-rw-r--r--lib/system.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 1ded4090b..64412b9b3 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -2752,6 +2752,9 @@ proc toOpenArrayByte*(x: openArray[char]; first, last: int): openArray[byte] {.
 proc toOpenArrayByte*(x: seq[char]; first, last: int): openArray[byte] {.
   magic: "Slice".}
 
+proc toOpenArrayChar*(x: openArray[byte]; first, last: int): openArray[char] {.
+  magic: "Slice".}
+
 when defined(genode):
   var componentConstructHook*: proc (env: GenodeEnv) {.nimcall.}
     ## Hook into the Genode component bootstrap process.