From 5edb04999cc63b5fe598ae968cfe29b8f16ccdd3 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Fri, 10 Jul 1998 11:36:26 +0000 Subject: [PATCH] strictly check for the associated get/set arg functions. if an arg is Fri Jul 10 13:29:53 1998 Tim Janik * 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. --- ChangeLog | 12 ++++++++++++ ChangeLog.pre-2-0 | 12 ++++++++++++ ChangeLog.pre-2-10 | 12 ++++++++++++ ChangeLog.pre-2-2 | 12 ++++++++++++ ChangeLog.pre-2-4 | 12 ++++++++++++ ChangeLog.pre-2-6 | 12 ++++++++++++ ChangeLog.pre-2-8 | 12 ++++++++++++ gtk/gtkcontainer.c | 14 +++++--------- gtk/gtkobject.c | 14 +++++--------- 9 files changed, 94 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index f6b66b97be..4cffa35544 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Fri Jul 10 13:29:53 1998 Tim Janik + + * 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. + Fri Jul 10 09:37:50 1998 Tim Janik * gtk/gtkaccellabel.c (gtk_accel_label_accelerator_width): only take the diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index f6b66b97be..4cffa35544 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,15 @@ +Fri Jul 10 13:29:53 1998 Tim Janik + + * 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. + Fri Jul 10 09:37:50 1998 Tim Janik * gtk/gtkaccellabel.c (gtk_accel_label_accelerator_width): only take the diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f6b66b97be..4cffa35544 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,15 @@ +Fri Jul 10 13:29:53 1998 Tim Janik + + * 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. + Fri Jul 10 09:37:50 1998 Tim Janik * gtk/gtkaccellabel.c (gtk_accel_label_accelerator_width): only take the diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index f6b66b97be..4cffa35544 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,15 @@ +Fri Jul 10 13:29:53 1998 Tim Janik + + * 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. + Fri Jul 10 09:37:50 1998 Tim Janik * gtk/gtkaccellabel.c (gtk_accel_label_accelerator_width): only take the diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index f6b66b97be..4cffa35544 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,15 @@ +Fri Jul 10 13:29:53 1998 Tim Janik + + * 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. + Fri Jul 10 09:37:50 1998 Tim Janik * gtk/gtkaccellabel.c (gtk_accel_label_accelerator_width): only take the diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index f6b66b97be..4cffa35544 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,15 @@ +Fri Jul 10 13:29:53 1998 Tim Janik + + * 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. + Fri Jul 10 09:37:50 1998 Tim Janik * gtk/gtkaccellabel.c (gtk_accel_label_accelerator_width): only take the diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f6b66b97be..4cffa35544 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,15 @@ +Fri Jul 10 13:29:53 1998 Tim Janik + + * 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. + Fri Jul 10 09:37:50 1998 Tim Janik * gtk/gtkaccellabel.c (gtk_accel_label_accelerator_width): only take the 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 diff --git a/gtk/gtkobject.c b/gtk/gtkobject.c index 78dd409713..c0d9e2ea23 100644 --- a/gtk/gtkobject.c +++ b/gtk/gtkobject.c @@ -800,8 +800,8 @@ gtk_object_arg_set (GtkObject *object, } oclass = gtk_type_class (info->class_type); - if (oclass->set_arg) - oclass->set_arg (object, arg, info->arg_id); + g_assert (oclass->set_arg != NULL); + oclass->set_arg (object, arg, info->arg_id); } void @@ -841,13 +841,9 @@ gtk_object_arg_get (GtkObject *object, } oclass = gtk_type_class (info->class_type); - if (oclass->get_arg) - { - arg->type = info->type; - oclass->get_arg (object, arg, info->arg_id); - } - else - arg->type = GTK_TYPE_INVALID; + g_assert (oclass->get_arg != NULL); + arg->type = info->type; + oclass->get_arg (object, arg, info->arg_id); } void