[pygobject] treat GFreeFunc as equivalent to GDestroyNotify when scanning callbacks



commit 6d7ed6c322234c240b1063a1dfaadd17157432a9
Author: Jonathan Matthew <jonathan d14n org>
Date:   Tue Jul 13 20:27:28 2010 +1000

    treat GFreeFunc as equivalent to GDestroyNotify when scanning callbacks
    
    https://bugzilla.gnome.org/show_bug.cgi?id=624232

 gi/pygi-callbacks.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gi/pygi-callbacks.c b/gi/pygi-callbacks.c
index d7537ee..c57ea22 100644
--- a/gi/pygi-callbacks.c
+++ b/gi/pygi-callbacks.c
@@ -95,7 +95,8 @@ _pygi_scan_for_callbacks (GIFunctionInfo *function_info,
             interface_type = g_base_info_get_type (interface_info);
             if (interface_type == GI_INFO_TYPE_CALLBACK &&
                     ! (strcmp (g_base_info_get_namespace ( (GIBaseInfo*) interface_info), "GLib") == 0 &&
-                       strcmp (g_base_info_get_name ( (GIBaseInfo*) interface_info), "DestroyNotify") == 0)) {
+                       (strcmp (g_base_info_get_name ( (GIBaseInfo*) interface_info), "DestroyNotify") == 0 ||
+                       (strcmp (g_base_info_get_name ( (GIBaseInfo*) interface_info), "FreeFunc") == 0)))) {
                 if (*callback_index != G_MAXUINT8) {
                     PyErr_Format (PyExc_TypeError, "Function %s.%s has multiple callbacks, not supported",
                                   g_base_info_get_namespace ( (GIBaseInfo*) function_info),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]