commit aee1db32a7f22c77011ecfae0765c9c0b27bb7f3 parent 4c26c8fa24f1947c4ce73bbee3696bc1cb301a59 Author: Holger Berndt <hb@claws-mail.org> Date: Sun, 18 Aug 2013 23:49:20 +0200 Python plugin: Mailbox: Add type checking function Diffstat:
| M | src/plugins/python/mailboxtype.c | | | 5 | +++++ |
| M | src/plugins/python/mailboxtype.h | | | 2 | ++ |
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/plugins/python/mailboxtype.c b/src/plugins/python/mailboxtype.c @@ -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); +} diff --git a/src/plugins/python/mailboxtype.h b/src/plugins/python/mailboxtype.h @@ -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 */