[Commits] [SCM] claws branch, master, updated. 3.9.3-12-gb68cfc8

holger at claws-mail.org holger at claws-mail.org
Mon Jan 27 22:33:15 CET 2014


The branch master of project "claws" (Claws Mail) has been updated
       via  b68cfc804576fc1097370435e2cc05580c8c77fc (commit)
      from  845d06230be8876ec0664d362125e1e1b6575507 (commit)


- Log -----------------------------------------------------------------
commit b68cfc804576fc1097370435e2cc05580c8c77fc
Author: Holger Berndt <hb at claws-mail.org>
Date:   Sun Jan 26 13:14:21 2014 +0100

    Python plugin: Also check for _PyGtk_API being a PyCapsule
    
    Seems like Arch Linux patched pygtk to wrap into a PyCapsule instead
    of a PyCObject.
    
    Thanks to Drew Ferguson for reporting.

diff --git a/src/plugins/python/python-hooks.c b/src/plugins/python/python-hooks.c
index fd7ba60..4cd1cb5 100644
--- a/src/plugins/python/python-hooks.c
+++ b/src/plugins/python/python-hooks.c
@@ -196,9 +196,15 @@ parasite_python_init(char **error)
          */
         if (cobject != NULL)
         {
-            if (PyCObject_Check(cobject))
+            if (PyCObject_Check(cobject)) {
                 _PyGtk_API = (struct _PyGtk_FunctionStruct*)
                 PyCObject_AsVoidPtr(cobject);
+            }
+#if PY_VERSION_HEX >= 0x02070000
+            else if (PyCapsule_IsValid(cobject, "gtk._gtk._PyGtk_API")) {
+                _PyGtk_API = (struct _PyGtk_FunctionStruct*)PyCapsule_GetPointer(cobject, "gtk._gtk._PyGtk_API");
+            }
+#endif
             else {
               *error = g_strdup("Parasite: Could not find _PyGtk_API object");
                 return 0;

-----------------------------------------------------------------------

Summary of changes:
 src/plugins/python/python-hooks.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list