GNOME Bugzilla – Bug 546734
missing Py_INCREFs for some file async methods
Last modified: 2008-08-07 09:50:30 UTC
_wrap_g_file_load_contents_async doesn't increment the refcounts of notify->callback and notify->data, so the objects tend to get garbage collected while the operation is in progress. Adding Py_INCREF(notify->callback) and Py_XINCREF(notify->data) as seen in most other async method wrappers makes everything behave sanely. I noticed this while trying to use file.load_contents_async, but it also affects a few other file async methods: append_to_async, create_async, replace_async, query_info_async. I checked the other .override files and found no other async method wrappers that didn't increment these refcounts.
Created attachment 116037 [details] [review] add missing refs
Comment on attachment 116037 [details] [review] add missing refs Looks good, please commit
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.
wow... I've miss them all! sorry guys.