def __init__(self, filename, iflags, mode): with _lock: res = lib.gdbm_open(filename, 0, iflags, mode, ffi.NULL) self.__size = -1 if not res: self.__raise_from_errno() self.__ll_dbm = res