Commit 83b7823a authored by Ignacio Casal Quinteiro's avatar Ignacio Casal Quinteiro Committed by John (J5) Palmieri
Browse files

[python3] fix build. PYcairo_IMPORT doesn't exists anymore

parent 3e933784
......@@ -30,7 +30,7 @@
#include <pycairo/py3cairo.h>
#endif
Pycairo_CAPI_t *Pycairo_CAPI;
static Pycairo_CAPI_t *Pycairo_CAPI;
#include "pygi-foreign.h"
......@@ -115,7 +115,12 @@ cairo_surface_release (GIBaseInfo *base_info,
static PyMethodDef _gi_cairo_functions[] = {};
PYGLIB_MODULE_START(_gi_cairo, "_gi_cairo")
{
#if PY_VERSION_HEX < 0x03000000
Pycairo_IMPORT;
#else
Pycairo_CAPI = (Pycairo_CAPI_t*) PyCObject_Import("cairo", "CAPI");
#endif
if (Pycairo_CAPI == NULL)
return PYGLIB_MODULE_ERROR_RETURN;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment