[gjs] [arg] Allow unregistered flag arguments



commit e2b3de1f534b32529a56dc6322b6e7899525ed7d
Author: Johan Dahlin <johan gnome org>
Date:   Tue Apr 20 18:40:19 2010 -0300

    [arg] Allow unregistered flag arguments
    
    Allows arguments such as GConnectFlags used by
    GtkBuilder.connect_signals_full which does not have a registered
    GType to be usable from GJS.
    
    Acked-By: Colin

 gi/arg.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)
---
diff --git a/gi/arg.c b/gi/arg.c
index 0595cc9..2c23355 100644
--- a/gi/arg.c
+++ b/gi/arg.c
@@ -1394,15 +1394,7 @@ gjs_value_from_g_argument (JSContext  *context,
 
                 goto out;
             } else if (interface_type == GI_INFO_TYPE_FLAGS) {
-                /* This should be fixed to work without a GType, just like Enum */
                 gtype = g_registered_type_info_get_g_type((GIRegisteredTypeInfo*)interface_info);
-                if (gtype == G_TYPE_NONE) {
-                    gjs_throw(context,
-                              "Can't yet handle flags type '%s' that is not registered with GObject",
-                              g_base_info_get_name(interface_info));
-                    goto out;
-                }
-
                 if (_gjs_flags_value_is_valid(context, gtype, arg->v_int))
                     value = INT_TO_JSVAL(arg->v_int);
 



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