"""
from ctypes import c_char_p, c_uint
-from notmuch.globals import (
+from .globals import (
nmlib,
Enum,
_str,
# create reference to parent db to keep it alive
self._db = db
# create query, return None if too little mem available
- query_p = Query._create(db.db_p, _str(querystr))
+ query_p = Query._create(db._db, _str(querystr))
if not query_p:
raise NullPointerError
self._query = query_p
def __del__(self):
"""Close and free the Query"""
- if self._query is not None:
+ if self._query:
self._destroy(self._query)