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:
parent
d68f64254e
commit
b42daf41d8
4 changed files with 15 additions and 15 deletions
|
|
@ -334,9 +334,7 @@ template writeByte*(span: var PageSpan, val: byte) =
|
|||
span.startAddr = offset(span.startAddr, 1)
|
||||
|
||||
template charsToBytes*(chars: openArray[char]): untyped =
|
||||
bind makeOpenArray
|
||||
var charsStart = unsafeAddr chars[0]
|
||||
makeOpenArray(cast[ptr byte](charsStart), chars.len)
|
||||
chars.toOpenArrayByte(0, chars.len - 1)
|
||||
|
||||
type
|
||||
ReadFlag* = enum
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue