Python plugin: Mailbox: Add type checking function
authorHolger Berndt <hb@claws-mail.org>
Sun, 18 Aug 2013 21:49:20 +0000 (23:49 +0200)
committerHolger Berndt <hb@claws-mail.org>
Sun, 18 Aug 2013 21:49:20 +0000 (23:49 +0200)
src/plugins/python/mailboxtype.c
src/plugins/python/mailboxtype.h

index 3cc6c26..f0fa4f0 100644 (file)
@@ -143,3 +143,8 @@ PyTypeObject* clawsmail_mailbox_get_type_object()
 {
   return &clawsmail_MailboxType;
 }
+
+gboolean clawsmail_mailbox_check(PyObject *self)
+{
+  return (PyObject_TypeCheck(self, &clawsmail_MailboxType) != 0);
+}
index 5aeb9a9..4640a60 100644 (file)
@@ -30,4 +30,6 @@ PyObject* clawsmail_mailbox_new(Folder *folder);
 Folder* clawsmail_mailbox_get_folder(PyObject *self);
 PyTypeObject* clawsmail_mailbox_get_type_object();
 
+gboolean clawsmail_mailbox_check(PyObject *self);
+
 #endif /* MAILBOXTYPE_H */