clean ups. -timj

clean ups.
-timj
This commit is contained in:
Tim Janik
1998-02-07 04:59:23 +00:00
parent edad08addd
commit 89107cb751
2 changed files with 13 additions and 3 deletions

View File

@ -109,10 +109,11 @@ gtk_object_debug (void)
GtkObject *obj;
obj = (GtkObject*) node->data;
printf ("%p: %s %d %s\n",
printf ("%p: %s ref_count=%d%s%s\n",
obj, gtk_type_name (GTK_OBJECT_TYPE (obj)),
obj->ref_count,
GTK_OBJECT_FLOATING (obj)? "floating" : "");
GTK_OBJECT_FLOATING (obj) ? " (floating)" : "",
GTK_OBJECT_DESTROYED (obj) ? " (destroyed)" : "");
}
}
printf ("living objects count = %d\n", obj_count);
@ -456,7 +457,7 @@ gtk_object_destroy (GtkObject *object)
*
* Weak refs are very similar to the old "destroy" signal. They allow
* one to register a callback that is called when the weakly
* referenced object is destroyed.
* referenced object is finalized.
*
* They are not implemented as a signal because they really are
* special and need to be used with great care. Unlike signals, who
@ -704,6 +705,11 @@ gtk_object_query_args (GtkType class_type,
if (!arg_info_ht)
return NULL;
/* make sure the types class has been initialized, because
* the argument setup happens in the gtk_*_class_init() functions.
*/
gtk_type_class (class_type);
query_data.arg_list = NULL;
query_data.class_type = class_type;
g_hash_table_foreach (arg_info_ht, gtk_query_arg_foreach, &query_data);

View File

@ -1124,6 +1124,10 @@ void
gtk_widget_destroyed (GtkWidget *widget,
GtkWidget **widget_pointer)
{
/* Don't make any assumptions about the
* value of widget!
* Even check widget_pointer.
*/
if (widget_pointer)
*widget_pointer = NULL;
}