use ptr byte cast
This commit is contained in:
parent
e238632e57
commit
07184af965
1 changed files with 1 additions and 5 deletions
|
|
@ -442,11 +442,7 @@ proc fileInput*(filename: string,
|
|||
return fileInput(file, offset, pageSize)
|
||||
|
||||
proc unsafeMemoryInput*(mem: openArray[byte]): InputStreamHandle =
|
||||
let head =
|
||||
if mem.len > 0:
|
||||
unsafeAddr mem[0]
|
||||
else:
|
||||
default(ptr byte)
|
||||
let head = cast[ptr byte](mem)
|
||||
|
||||
makeHandle InputStream(
|
||||
span: PageSpan(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue