summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gobject/gobjectmodule.c2
-rw-r--r--gobject/pygboxed.c4
-rw-r--r--gobject/pygobject.c2
-rw-r--r--gobject/pygobject.h4
4 files changed, 8 insertions, 4 deletions
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c
index 45b5ef7..7cc06f0 100644
--- a/gobject/gobjectmodule.c
+++ b/gobject/gobjectmodule.c
@@ -277,7 +277,7 @@ PyTypeObject PyGInterface_Type = {
(initproc)pyg_interface_init, /* tp_init */
(allocfunc)0, /* tp_alloc */
(newfunc)0, /* tp_new */
- object_free, /* tp_free */
+ (freefunc)object_free, /* tp_free */
(inquiry)0, /* tp_is_gc */
(PyObject *)0, /* tp_bases */
};
diff --git a/gobject/pygboxed.c b/gobject/pygboxed.c
index 10fde80..31db218 100644
--- a/gobject/pygboxed.c
+++ b/gobject/pygboxed.c
@@ -141,7 +141,7 @@ PyTypeObject PyGBoxed_Type = {
(initproc)pyg_boxed_init, /* tp_init */
(allocfunc)0, /* tp_alloc */
(newfunc)0, /* tp_new */
- pyg_boxed_free, /* tp_free */
+ (freefunc)pyg_boxed_free, /* tp_free */
(inquiry)0, /* tp_is_gc */
(PyObject *)0, /* tp_bases */
};
@@ -340,7 +340,7 @@ PyTypeObject PyGPointer_Type = {
(initproc)pyg_pointer_init, /* tp_init */
(allocfunc)0, /* tp_alloc */
(newfunc)0, /* tp_new */
- pyg_pointer_free, /* tp_free */
+ (freefunc)pyg_pointer_free, /* tp_free */
(inquiry)0, /* tp_is_gc */
(PyObject *)0, /* tp_bases */
};
diff --git a/gobject/pygobject.c b/gobject/pygobject.c
index cf016fa..2bc2f3f 100644
--- a/gobject/pygobject.c
+++ b/gobject/pygobject.c
@@ -1198,7 +1198,7 @@ PyTypeObject PyGObject_Type = {
(initproc)pygobject_init, /* tp_init */
(allocfunc)0, /* tp_alloc */
(newfunc)0, /* tp_new */
- pygobject_free, /* tp_free */
+ (freefunc)pygobject_free, /* tp_free */
(inquiry)0, /* tp_is_gc */
(PyObject *)0, /* tp_bases */
};
diff --git a/gobject/pygobject.h b/gobject/pygobject.h
index d6c681c..e65611d 100644
--- a/gobject/pygobject.h
+++ b/gobject/pygobject.h
@@ -7,6 +7,10 @@
#include <glib.h>
#include <glib-object.h>
+#if PY_VERSION_HEX < 0x02030000
+ typedef destructor freefunc;
+#endif
+
typedef struct {
PyObject_HEAD
GObject *obj;