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 3cc6c2648ad79faa261d364acb77f128904ddee4..f0fa4f048f83de32bbc856cc5d30c1ff9847fa54 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 5aeb9a93d35f5f7165a82b91258250b6344d933a..4640a605b924a6006b6bab199e4d836203a13fe7 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 */