[pygobject] pygi-foreign-cairo.c: Use official py3cairo API



commit 997d4e70b2793039d916acf8921087576622152e
Author: Martin Pitt <martinpitt gnome org>
Date:   Wed Nov 14 06:57:04 2012 +0100

    pygi-foreign-cairo.c: Use official py3cairo API
    
    Do not clobber py3cairo's Pycairo_CAPI global variable, and use import_cairo()
    instead of our own code.

 gi/pygi-foreign-cairo.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gi/pygi-foreign-cairo.c b/gi/pygi-foreign-cairo.c
index d1846c5..2435e70 100644
--- a/gi/pygi-foreign-cairo.c
+++ b/gi/pygi-foreign-cairo.c
@@ -25,12 +25,12 @@
 #include <Python.h>
 
 #if PY_VERSION_HEX < 0x03000000
+static Pycairo_CAPI_t *Pycairo_CAPI;
 #include <pycairo.h>
 #else
 #include <pycairo/py3cairo.h>
 #endif
 
-static Pycairo_CAPI_t *Pycairo_CAPI;
 
 #include "pygi-foreign.h"
 
@@ -191,7 +191,7 @@ PYGLIB_MODULE_START(_gi_cairo, "_gi_cairo")
 #if PY_VERSION_HEX < 0x03000000
     Pycairo_IMPORT;
 #else
-    Pycairo_CAPI = (Pycairo_CAPI_t*) PyCapsule_Import("cairo.CAPI", 0);
+    import_cairo();
 #endif
 
     if (Pycairo_CAPI == NULL)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]