@@ 90,7 90,7 @@ proc GetValue(iter: Iterator): CppString {.importcpp: "#->GetValue()".}
template importDBM(T: untyped): untyped =
proc `=destroy`(obj: var `T Obj`) {.importcpp: "#.~" & $T & "()".}
- proc Open(dbm: T; path: cstring; writeable: bool; options: int32) {.
+ proc Open(dbm: T; path: cstring; writeable: bool; options: int32): Status {.
importcpp: "#->Open(@)".}
proc Close(dbm: T) {.importcpp: "#->Close()".}
proc Get(dbm: T; key: StringView; value: ptr CppString): Status {.
@@ 126,7 126,7 @@ proc newDbm*[T: DBM](path: string; rw: RW; options: set[OpenOption] = {}): T =
var opts: int32
for o in options.items: opts.inc o.int32
result = construct[T]()
- result.Open(path, rw == writeable, opts)
+ check result.Open(path, rw == writeable, opts)
proc newDbm*[T: MemoryDBM](): T =
construct[T]()