diff options
author | Tim Janik <timj@gtk.org> | 1998-07-10 11:36:26 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1998-07-10 11:36:26 +0000 |
commit | 5edb04999cc63b5fe598ae968cfe29b8f16ccdd3 (patch) | |
tree | a7524c7d9bd06563794c9c529e7c9ceb547954af /gtk/gtkcontainer.c | |
parent | ab3f4a160797f12334885c4c24223c7027a11a83 (diff) | |
download | gtk+-5edb04999cc63b5fe598ae968cfe29b8f16ccdd3.tar.gz |
strictly check for the associated get/set arg functions. if an arg is
Fri Jul 10 13:29:53 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c:
(gtk_container_arg_get):
(gtk_container_arg_set):
* gtk/gtkobject.c:
(gtk_object_arg_set):
(gtk_object_arg_get):
strictly check for the associated get/set arg functions. if an
arg is readable or writable, the associated class functions *must*
be provided.
Diffstat (limited to 'gtk/gtkcontainer.c')
-rw-r--r-- | gtk/gtkcontainer.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index c5a236d6cc..57de4b12b9 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -492,8 +492,8 @@ gtk_container_arg_set (GtkContainer *container, } class = gtk_type_class (info->class_type); - if (class->set_child_arg) - class->set_child_arg (container, child, arg, info->arg_id); + g_assert (class->set_child_arg != NULL); + class->set_child_arg (container, child, arg, info->arg_id); } void @@ -537,13 +537,9 @@ gtk_container_arg_get (GtkContainer *container, } class = gtk_type_class (info->class_type); - if (class->get_child_arg) - { - arg->type = info->type; - class->get_child_arg (container, child, arg, info->arg_id); - } - else - arg->type = GTK_TYPE_INVALID; + g_assert (class->get_child_arg != NULL); + arg->type = info->type; + class->get_child_arg (container, child, arg, info->arg_id); } void |