diff --git a/leveldbstatic.nim b/leveldbstatic.nim index 282988e..11880bf 100644 --- a/leveldbstatic.nim +++ b/leveldbstatic.nim @@ -76,12 +76,13 @@ type LevelDbException* = object of CatchableError - IterNext* = proc(): (string, string) {.gcsafe, closure, raises: [LevelDbException].} - IterDispose* = proc() {.gcsafe, closure, raises: [].} - LevelDbQueryIter* = ref object - finished*: bool - next*: IterNext - dispose*: IterDispose + IterNext* = proc(iter: var LevelDbQueryIterObj): (string, string) {.gcsafe, closure, raises: [LevelDbException].} + IterDispose* = proc(iter: var LevelDbQueryIterObj) {.gcsafe, closure, raises: [].} + LevelDbQueryIterObj = object + finished: bool + next: IterNext + dispose: IterDispose + LevelDbQueryIter* = ref LevelDbQueryIterObj const version* = block: @@ -436,7 +437,16 @@ proc seekToQueryStart(iterPtr: ptr leveldb_iterator_t, prefix: string, skip: int for i in 0..