diff options
Diffstat (limited to 'gtk/gtkargcollector.c')
-rw-r--r-- | gtk/gtkargcollector.c | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/gtk/gtkargcollector.c b/gtk/gtkargcollector.c index e92316d6c..4ec3d6ad5 100644 --- a/gtk/gtkargcollector.c +++ b/gtk/gtkargcollector.c @@ -38,13 +38,7 @@ G_STMT_START { \ GtkType fundamental_type; \ \ fundamental_type = GTK_FUNDAMENTAL_TYPE (arg->type); \ - if (fundamental_type > GTK_TYPE_FUNDAMENTAL_LAST) \ - { \ - fundamental_type = gtk_type_get_varargs_type (fundamental_type); \ - if (!fundamental_type) \ - fundamental_type = GTK_FUNDAMENTAL_TYPE (arg->type); \ - } \ - \ + \ error_msg = NULL; \ switch (fundamental_type) \ { \ @@ -124,42 +118,25 @@ G_STMT_START { \ GTK_VALUE_SIGNAL (*arg).f = va_arg (var_args, GtkSignalFunc); \ GTK_VALUE_SIGNAL (*arg).d = va_arg (var_args, gpointer); \ break; \ - case GTK_TYPE_ARGS: \ - GTK_VALUE_ARGS (*arg).n_args = va_arg (var_args, gint); \ - GTK_VALUE_ARGS (*arg).args = va_arg (var_args, GtkArg*); \ - break; \ - case GTK_TYPE_FOREIGN: \ - GTK_VALUE_FOREIGN (*arg).data = va_arg (var_args, gpointer); \ - GTK_VALUE_FOREIGN (*arg).notify = va_arg (var_args, GtkDestroyNotify); \ - break; \ - case GTK_TYPE_CALLBACK: \ - GTK_VALUE_CALLBACK (*arg).marshal = va_arg (var_args, GtkCallbackMarshal); \ - GTK_VALUE_CALLBACK (*arg).data = va_arg (var_args, gpointer); \ - GTK_VALUE_CALLBACK (*arg).notify = va_arg (var_args, GtkDestroyNotify); \ - break; \ - case GTK_TYPE_C_CALLBACK: \ - GTK_VALUE_C_CALLBACK (*arg).func = va_arg (var_args, GtkFunction); \ - GTK_VALUE_C_CALLBACK (*arg).func_data = va_arg (var_args, gpointer); \ - break; \ \ /* we do some extra sanity checking when collecting objects, \ * i.e. if the object pointer is not NULL, we check whether we \ * actually got an object pointer within the desired class branch. \ */ \ - case GTK_TYPE_OBJECT: \ + case G_TYPE_OBJECT: \ GTK_VALUE_OBJECT (*arg) = va_arg (var_args, GtkObject*); \ if (GTK_VALUE_OBJECT (*arg) != NULL) \ { \ register GtkObject *object = GTK_VALUE_OBJECT (*arg); \ \ - if (object->klass == NULL) \ + if (((GTypeInstance*) object)->g_class == NULL) \ error_msg = g_strconcat ("invalid unclassed object pointer for argument type `", \ gtk_type_name (arg->type), \ "'", \ NULL); \ else if (!gtk_type_is_a (GTK_OBJECT_TYPE (object), arg->type)) \ error_msg = g_strconcat ("invalid object `", \ - gtk_type_name (GTK_OBJECT_TYPE (object)), \ + gtk_type_name (G_OBJECT_TYPE (object)), \ "' for argument type `", \ gtk_type_name (arg->type), \ "'", \ |