Added function to keep symetry with g_node_insert_before. 2000-09-29
[platform/upstream/glib.git] / gobject / gobject.c
index 9dc289f..5a703ce 100644 (file)
@@ -97,7 +97,7 @@ debug_objects_atexit (void)
        }
     }
 }
-#endif DEBUG_OBJECTS
+#endif /* DEBUG_OBJECTS */
 
 void
 g_object_type_init (void)      /* sync with gtype.c */
@@ -140,7 +140,7 @@ g_object_type_init (void)   /* sync with gtype.c */
   
 #ifdef DEBUG_OBJECTS
   g_atexit (debug_objects_atexit);
-#endif DEBUG_OBJECTS
+#endif /* DEBUG_OBJECTS */
 }
 
 static void
@@ -256,7 +256,7 @@ g_object_do_init (GObject *object)
       debug_objects_count++;
       g_hash_table_insert (debug_objects_ht, object, object);
     }
-#endif DEBUG_OBJECTS
+#endif /* DEBUG_OBJECTS */
 }
 
 static void
@@ -270,7 +270,10 @@ g_object_last_unref (GObject *object)
   object->ref_count -= 1;
   
   if (object->ref_count == 0)  /* may have been re-referenced meanwhile */
-    G_OBJECT_GET_CLASS (object)->finalize (object);
+    {
+      G_OBJECT_GET_CLASS (object)->finalize (object);
+      g_type_free_instance ((GTypeInstance*) object);
+    }
 }
 
 static void
@@ -295,9 +298,7 @@ g_object_do_finalize (GObject *object)
       g_hash_table_remove (debug_objects_ht, object);
       debug_objects_count--;
     }
-#endif DEBUG_OBJECTS
-  
-  g_type_free_instance ((GTypeInstance*) object);
+#endif /* DEBUG_OBJECTS */
 }
 
 gpointer
@@ -337,9 +338,9 @@ static void
 g_object_do_dispatch_param_changed (GObject    *object,
                                    GParamSpec *pspec)
 {
-  g_message ("NOTIFICATION: parameter `%s' changed on object `%s'",
+/*  g_message ("NOTIFICATION: parameter `%s' changed on object `%s'",
             pspec->name,
-            G_OBJECT_TYPE_NAME (object));
+            G_OBJECT_TYPE_NAME (object));*/
 }
 
 static gboolean