diff options
author | Johan Dahlin <johan@gnome.org> | 2008-07-21 17:55:40 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2008-07-21 17:55:40 +0000 |
commit | d23d14addd53f7457684146aaade44cec2cf4643 (patch) | |
tree | 86eb4820b1b3a896958d636ea04abcd39bbce061 /glib/pyglib.c | |
parent | 6594b6f890693c19dfeed20889b0db4c6217c31f (diff) | |
download | pygobject-d23d14addd53f7457684146aaade44cec2cf4643.tar.gz pygobject-d23d14addd53f7457684146aaade44cec2cf4643.tar.xz pygobject-d23d14addd53f7457684146aaade44cec2cf4643.zip |
Make pyglib_destroy_notify and pyglib_handler_marshal private. Add a few
2008-07-21 Johan Dahlin <johan@gnome.org>
* glib/glibmodule.c (pyglib_idle_add), (pyglib_timeout_add),
(pyglib_timeout_add_seconds), (pyglib_io_add_watch):
* glib/pyglib-private.h:
* glib/pyglib.c (pyglib_destroy_notify), (_pyglib_handler_marshal):
* glib/pyglib.h:
* glib/pygsource.c (pyg_source_set_callback):
Make pyglib_destroy_notify and pyglib_handler_marshal private.
Add a few public prototypes.
svn path=/trunk/; revision=848
Diffstat (limited to 'glib/pyglib.c')
-rw-r--r-- | glib/pyglib.c | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/glib/pyglib.c b/glib/pyglib.c index a6d3c26..ee163b8 100644 --- a/glib/pyglib.c +++ b/glib/pyglib.c @@ -339,8 +339,30 @@ pyglib_main_context_new(GMainContext *context) return (PyObject *)self; } +/** + * pyglib_destroy_notify: + * @user_data: a PyObject pointer. + * + * A function that can be used as a GDestroyNotify callback that will + * call Py_DECREF on the data. + */ +void +pyglib_destroy_notify(gpointer user_data) +{ + PyObject *obj = (PyObject *)user_data; + PyGILState_STATE state; + + g_return_if_fail (_PyGLib_API != NULL); + + state = pyglib_gil_state_ensure(); + Py_DECREF(obj); + pyglib_gil_state_release(state); +} + +/****** Private *****/ + gboolean -pyglib_handler_marshal(gpointer user_data) +_pyglib_handler_marshal(gpointer user_data) { PyObject *tuple, *ret; gboolean res; @@ -366,22 +388,3 @@ pyglib_handler_marshal(gpointer user_data) return res; } -/** - * pyglib_destroy_notify: - * @user_data: a PyObject pointer. - * - * A function that can be used as a GDestroyNotify callback that will - * call Py_DECREF on the data. - */ -void -pyglib_destroy_notify(gpointer user_data) -{ - PyObject *obj = (PyObject *)user_data; - PyGILState_STATE state; - - g_return_if_fail (_PyGLib_API != NULL); - - state = pyglib_gil_state_ensure(); - Py_DECREF(obj); - pyglib_gil_state_release(state); -} |