[pygobject] [gi] add the rectangle_int_t forign cairo type
- From: John Palmieri <johnp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] [gi] add the rectangle_int_t forign cairo type
- Date: Wed, 10 Nov 2010 04:03:41 +0000 (UTC)
commit 9ce3edf69824935aeca9e676eaa9782786c22a97
Author: John (J5) Palmieri <johnp redhat com>
Date: Tue Nov 9 22:57:41 2010 -0500
[gi] add the rectangle_int_t forign cairo type
* the pycairo maintainer is not being responsive so you will need the patch at
https://bugs.freedesktop.org/show_bug.cgi?id=31111
* added conditionals, if the api doesn't exist in PyCairo we will compile
without the forign structs
gi/pygi-foreign-cairo.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gi/pygi-foreign-cairo.c b/gi/pygi-foreign-cairo.c
index d3c05f3..6326397 100644
--- a/gi/pygi-foreign-cairo.c
+++ b/gi/pygi-foreign-cairo.c
@@ -112,6 +112,7 @@ cairo_surface_release (GIBaseInfo *base_info,
Py_RETURN_NONE;
}
+#ifdef PycairoRectangleInt_FromRectangleInt
PyObject *
cairo_rectangle_int_to_arg (PyObject *value,
GITypeInfo *type_info,
@@ -162,6 +163,7 @@ cairo_rectangle_int_release (GIBaseInfo *base_info,
g_free (struct_);
Py_RETURN_NONE;
}
+#endif
static PyMethodDef _gi_cairo_functions[] = {};
PYGLIB_MODULE_START(_gi_cairo, "_gi_cairo")
@@ -182,11 +184,13 @@ PYGLIB_MODULE_START(_gi_cairo, "_gi_cairo")
cairo_surface_from_arg,
cairo_surface_release);
+#ifdef PycairoRectangleInt_FromRectangleInt
pygi_register_foreign_struct ("cairo",
"RectangleInt",
cairo_rectangle_int_to_arg,
cairo_rectangle_int_from_arg,
cairo_rectangle_int_release);
+#endif
}
PYGLIB_MODULE_END;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]