Replace unsafeAddr by baseAddr (#32)

* Replace unsafeAddr xxx[0] by baseAddr(xxx)

* Fix styleCheck:usages

* Update CI conf

* Fix charsToBytes

* Fix outputs write

* Add test
This commit is contained in:
Ludovic Chenut 2022-11-24 12:55:42 +01:00 • committed by GitHub
commit b42daf41d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 15 deletions

View file

@ -481,7 +481,7 @@ func memoryInput*(data: openArray[byte]): InputStreamHandle =
page = buffers.addWritablePage(data.len)
pageSpan = page.fullSpan
copyMem(pageSpan.startAddr, unsafeAddr data[0], data.len)
copyMem(pageSpan.startAddr, baseAddr(data), data.len)
InputStream(buffers: buffers,
span: pageSpan,