- from PLD, fixed python2 files
[packages/python-pygobject.git] / python-pygobject-pycairo.patch
1 --- pygobject-2.28.4/gi/pygi-foreign-cairo.c.orig       2011-04-18 17:36:47.000000000 +0200
2 +++ pygobject-2.28.4/gi/pygi-foreign-cairo.c    2011-05-22 20:57:19.521360594 +0200
3 @@ -30,7 +30,9 @@
4  #include <pycairo/py3cairo.h>
5  #endif
6  
7 +#if PY_VERSION_HEX < 0x03000000
8  Pycairo_CAPI_t *Pycairo_CAPI;
9 +#endif
10  
11  #include "pygi-foreign.h"
12  
13 @@ -115,7 +117,11 @@
14  static PyMethodDef _gi_cairo_functions[] = {};
15  PYGLIB_MODULE_START(_gi_cairo, "_gi_cairo")
16  {
17 +#if PY_VERSION_HEX < 0x03000000
18      Pycairo_IMPORT;
19 +#else
20 +    import_cairo();
21 +#endif
22      if (Pycairo_CAPI == NULL)
23          return PYGLIB_MODULE_ERROR_RETURN;
24