X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=bindings%2Fpython%2Fnotmuch%2Fdatabase.py;h=7923f768b1f78caec831c3018b5280367feb9712;hp=f17951510b88a539f9dfa5bb5437beb51e7d0fc6;hb=f0e0053149bb3b51f4a0cd43371292b639f236a8;hpb=12ebf879476ba60389c9310327b8a271f1f7eb5e diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py index f1795151..7923f768 100644 --- a/bindings/python/notmuch/database.py +++ b/bindings/python/notmuch/database.py @@ -18,9 +18,9 @@ Copyright 2010 Sebastian Spaeth ' """ import os -from ctypes import c_int, c_char_p, c_void_p, c_uint, c_long, byref, POINTER +from ctypes import c_char_p, c_void_p, c_uint, c_long, byref, POINTER from notmuch.globals import (nmlib, STATUS, NotmuchError, NotInitializedError, - NullPointerError, OutOfMemoryError, XapianError, Enum, _str, + NullPointerError, Enum, _str, NotmuchDatabaseP, NotmuchDirectoryP, NotmuchMessageP, NotmuchTagsP, NotmuchQueryP, NotmuchMessagesP, NotmuchThreadsP, NotmuchFilenamesP) from notmuch.thread import Threads @@ -385,7 +385,7 @@ class Database(object): be added. """ self._assert_db_is_initialized() - msg_p = c_void_p() + msg_p = NotmuchMessageP() status = self._add_message(self._db, _str(filename), byref(msg_p)) if not status in [STATUS.SUCCESS, STATUS.DUPLICATE_MESSAGE_ID]: @@ -453,7 +453,7 @@ class Database(object): the database was not intitialized. """ self._assert_db_is_initialized() - msg_p = c_void_p() + msg_p = NotmuchMessageP() status = Database._find_message(self._db, _str(msgid), byref(msg_p)) if status != STATUS.SUCCESS: raise NotmuchError(status) @@ -487,7 +487,7 @@ class Database(object): *Added in notmuch 0.9*""" self._assert_db_is_initialized() - msg_p = c_void_p() + msg_p = NotmuchMessageP() status = Database._find_message_by_filename(self._db, _str(filename), byref(msg_p)) if status != STATUS.SUCCESS: