mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-08 00:23:10 +00:00
do not need to check dataLen re: OOM error (and the check was incorrect anyway)
This commit is contained in:
parent
a68c4caa8e
commit
a73c58c632
@ -160,15 +160,6 @@ proc dataCol*(
|
||||
|
||||
let
|
||||
dataLen = sqlite3_column_bytes(s, i)
|
||||
|
||||
# an out-of-memory error can be inferred from a null pointer result
|
||||
if (unsafeAddr dataLen).isNil:
|
||||
let
|
||||
code = sqlite3_errcode(sqlite3_db_handle(s))
|
||||
|
||||
raise (ref Defect)(msg: $sqlite3_errstr(code))
|
||||
|
||||
let
|
||||
dataBytes = cast[ptr UncheckedArray[byte]](blob)
|
||||
|
||||
@(toOpenArray(dataBytes, 0, dataLen - 1))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user