summaryrefslogtreecommitdiffstats
path: root/gobject
diff options
context:
space:
mode:
Diffstat (limited to 'gobject')
-rw-r--r--gobject/gobjectmodule.c9
-rw-r--r--gobject/pygobject.h3
2 files changed, 9 insertions, 3 deletions
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c
index 1e61fd2..39fba99 100644
--- a/gobject/gobjectmodule.c
+++ b/gobject/gobjectmodule.c
@@ -250,7 +250,7 @@ pyg_param_spec_new(GParamSpec *pspec)
/* -------------- class <-> wrapper manipulation --------------- */
static void
-pygobject_destroy_notify(gpointer user_data)
+pyg_destroy_notify(gpointer user_data)
{
PyObject *obj = (PyObject *)user_data;
@@ -1228,7 +1228,7 @@ pygobject_dealloc(PyGObject *self)
Py_INCREF(self); /* grab a reference on the wrapper */
self->hasref = TRUE;
g_object_set_qdata_full(obj, pygobject_ownedref_key,
- self, pygobject_destroy_notify);
+ self, pyg_destroy_notify);
g_object_unref(obj);
/* we ref the type, so subtype_dealloc() doesn't kill off our
@@ -1441,7 +1441,7 @@ pygobject_set_data(PyGObject *self, PyObject *args)
return NULL;
quark = g_quark_from_string(key);
Py_INCREF(data);
- g_object_set_qdata_full(self->obj, quark, data, pygobject_destroy_notify);
+ g_object_set_qdata_full(self->obj, quark, data, pyg_destroy_notify);
Py_INCREF(Py_None);
return Py_None;
}
@@ -3002,7 +3002,10 @@ static struct _PyGObject_Functions functions = {
pygobject_register_wrapper,
pygobject_lookup_class,
pygobject_new,
+
pyg_closure_new,
+ pyg_destroy_notify,
+
pyg_type_from_object,
pyg_type_wrapper_new,
pyg_enum_get_value,
diff --git a/gobject/pygobject.h b/gobject/pygobject.h
index 8fa4542..9918dd3 100644
--- a/gobject/pygobject.h
+++ b/gobject/pygobject.h
@@ -37,8 +37,10 @@ struct _PyGObject_Functions {
void (* register_wrapper)(PyObject *self);
PyTypeObject *(* lookup_class)(GType type);
PyObject *(* newgobj)(GObject *obj);
+
GClosure *(* closure_new)(PyObject *callback, PyObject *extra_args,
PyObject *swap_data);
+ GDestroyNotify destroy_notify;
GType (* type_from_object)(PyObject *obj);
PyObject *(* type_wrapper_new)(GType type);
@@ -91,6 +93,7 @@ struct _PyGObject_Functions *_PyGObject_API;
#define pygobject_lookup_class (_PyGObject_API->lookup_class)
#define pygobject_new (_PyGObject_API->newgobj)
#define pyg_closure_new (_PyGObject_API->closure_new)
+#define pyg_destroy_notify (_PyGObject_API->destroy_notify)
#define pyg_type_from_object (_PyGObject_API->type_from_object)
#define pyg_type_wrapper_new (_PyGObject_API->type_wrapper_new)
#define pyg_enum_get_value (_PyGObject_API->enum_get_value)