diff options
author | Jonathan Matthew <jonathan@d14n.org> | 2008-08-07 09:45:50 +0000 |
---|---|---|
committer | Jonathan Matthew <jmatthew@src.gnome.org> | 2008-08-07 09:45:50 +0000 |
commit | 41ba53ca195b8c05ca5b4f01bf417d992adc6e1f (patch) | |
tree | 37e33ea2f4df103525e351e763918c7d7afe7979 | |
parent | f7a82eba4709a1671a75b01557e60ac189ced5a1 (diff) | |
download | pygobject-41ba53ca195b8c05ca5b4f01bf417d992adc6e1f.tar.gz pygobject-41ba53ca195b8c05ca5b4f01bf417d992adc6e1f.tar.xz pygobject-41ba53ca195b8c05ca5b4f01bf417d992adc6e1f.zip |
Bug 546734 – Missing Py_INCREFs for some file async methods
2008-08-07 Jonathan Matthew <jonathan@d14n.org>
Bug 546734 – Missing Py_INCREFs for some file async methods
* gio/gfile.override:
Increment refcounts on callbacks and callback data for
append_to_async, create_async, replace_async, query_info_async and
load_contents_async as for all other async methods.
svn path=/trunk/; revision=929
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | gio/gfile.override | 10 |
2 files changed, 19 insertions, 0 deletions
@@ -1,3 +1,12 @@ +2008-08-07 Jonathan Matthew <jonathan@d14n.org> + + Bug 546734 – Missing Py_INCREFs for some file async methods + + * gio/gfile.override: + Increment refcounts on callbacks and callback data for + append_to_async, create_async, replace_async, query_info_async and + load_contents_async as for all other async methods. + 2008-08-06 Johan Dahlin <johan@gnome.org> * gio/gfile.override: diff --git a/gio/gfile.override b/gio/gfile.override index 24785b6..cae5993 100644 --- a/gio/gfile.override +++ b/gio/gfile.override @@ -236,6 +236,8 @@ _wrap_g_file_load_contents_async(PyGObject *self, if (!pygio_check_cancellable(pycancellable, &cancellable)) return NULL; + Py_INCREF(notify->callback); + Py_XINCREF(notify->data); g_file_load_contents_async(G_FILE(self->obj), cancellable, (GAsyncReadyCallback)async_result_callback_marshal, @@ -819,6 +821,8 @@ _wrap_g_file_append_to_async(PyGObject *self, PyObject *args, PyObject *kwargs) if (!pygio_check_cancellable(pycancellable, &cancellable)) return NULL; + Py_INCREF(notify->callback); + Py_XINCREF(notify->data); g_file_append_to_async(G_FILE(self->obj), flags, io_priority, cancellable, (GAsyncReadyCallback)async_result_callback_marshal, notify); @@ -862,6 +866,8 @@ _wrap_g_file_create_async(PyGObject *self, PyObject *args, PyObject *kwargs) if (!pygio_check_cancellable(pycancellable, &cancellable)) return NULL; + Py_INCREF(notify->callback); + Py_XINCREF(notify->data); g_file_create_async(G_FILE(self->obj), flags, io_priority, cancellable, (GAsyncReadyCallback)async_result_callback_marshal, notify); @@ -911,6 +917,8 @@ _wrap_g_file_replace_async(PyGObject *self, PyObject *args, PyObject *kwargs) if (!pygio_check_cancellable(pycancellable, &cancellable)) return NULL; + Py_INCREF(notify->callback); + Py_XINCREF(notify->data); g_file_replace_async(G_FILE(self->obj), etag, make_backup, flags, io_priority, cancellable, (GAsyncReadyCallback)async_result_callback_marshal, @@ -957,6 +965,8 @@ _wrap_g_file_query_info_async(PyGObject *self, PyObject *args, PyObject *kwargs) if (!pygio_check_cancellable(pycancellable, &cancellable)) return NULL; + Py_INCREF(notify->callback); + Py_XINCREF(notify->data); g_file_query_info_async(G_FILE(self->obj), attributes, flags, io_priority, cancellable, (GAsyncReadyCallback)async_result_callback_marshal, |