From 6d55306dea6e5e229c6bee79d1b193446d903af4 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Thu, 15 Apr 2004 22:33:46 +0000 Subject: Prevent warnings in Python 2.3 --- gobject/gobjectmodule.c | 2 +- gobject/pygboxed.c | 4 ++-- gobject/pygobject.c | 2 +- gobject/pygobject.h | 4 ++++ 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 #include +#if PY_VERSION_HEX < 0x02030000 + typedef destructor freefunc; +#endif + typedef struct { PyObject_HEAD GObject *obj; -- cgit