chain up unconditionally in finalize() and dispose(). Also don't
authorMichael Natterer <mitch@imendio.com>
Mon, 16 Jun 2008 09:54:04 +0000 (09:54 +0000)
committerMichael Natterer <mitch@src.gnome.org>
Mon, 16 Jun 2008 09:54:04 +0000 (09:54 +0000)
2008-06-16  Michael Natterer  <mitch@imendio.com>

* *.c: chain up unconditionally in finalize() and dispose(). Also
don't dereference these function pointers when calling them since
that has no meaning at all.

svn path=/trunk/; revision=7048

35 files changed:
gio/ChangeLog
gio/gbufferedinputstream.c
gio/gbufferedoutputstream.c
gio/gcancellable.c
gio/gdummyfile.c
gio/gfileenumerator.c
gio/gfileicon.c
gio/gfileinfo.c
gio/gfilemonitor.c
gio/gfilenamecompleter.c
gio/gfilterinputstream.c
gio/ginputstream.c
gio/glocaldirectorymonitor.c
gio/glocalfile.c
gio/glocalfileenumerator.c
gio/glocalfileinputstream.c
gio/glocalfilemonitor.c
gio/glocalfileoutputstream.c
gio/gmemoryinputstream.c
gio/gmemoryoutputstream.c
gio/gmountoperation.c
gio/gnativevolumemonitor.c
gio/goutputstream.c
gio/gpollfilemonitor.c
gio/gsimpleasyncresult.c
gio/gthemedicon.c
gio/gunionvolumemonitor.c
gio/gunixinputstream.c
gio/gunixmount.c
gio/gunixmounts.c
gio/gunixoutputstream.c
gio/gunixvolume.c
gio/gunixvolumemonitor.c
gio/gvolumemonitor.c
gio/gwin32appinfo.c

index 31cf6b6..305f131 100644 (file)
@@ -1,3 +1,9 @@
+2008-06-16  Michael Natterer  <mitch@imendio.com>
+
+       * *.c: chain up unconditionally in finalize() and dispose(). Also
+       don't dereference these function pointers when calling them since
+       that has no meaning at all.
+
 2008-06-16  Ross Burton  <ross@burtonini.com>
 
        * gfileenumerator.c:
index 43129f1..28860e0 100644 (file)
@@ -298,8 +298,7 @@ g_buffered_input_stream_finalize (GObject *object)
 
   g_free (priv->buffer);
 
-  if (G_OBJECT_CLASS (g_buffered_input_stream_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_buffered_input_stream_parent_class)->finalize) (object);
+  G_OBJECT_CLASS (g_buffered_input_stream_parent_class)->finalize (object);
 }
 
 static void
index 4de538b..4185760 100644 (file)
@@ -335,8 +335,7 @@ g_buffered_output_stream_finalize (GObject *object)
 
   g_free (priv->buffer);
 
-  if (G_OBJECT_CLASS (g_buffered_output_stream_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_buffered_output_stream_parent_class)->finalize) (object);
+  G_OBJECT_CLASS (g_buffered_output_stream_parent_class)->finalize (object);
 }
 
 static void
index dba5475..9177e43 100644 (file)
@@ -78,9 +78,8 @@ g_cancellable_finalize (GObject *object)
   
   if (cancellable->cancel_pipe[1] != -1)
     close (cancellable->cancel_pipe[1]);
-  
-  if (G_OBJECT_CLASS (g_cancellable_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_cancellable_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_cancellable_parent_class)->finalize (object);
 }
 
 static void
index 1fa0aed..2c7edcf 100644 (file)
@@ -87,9 +87,8 @@ g_dummy_file_finalize (GObject *object)
     _g_decoded_uri_free (dummy->decoded_uri);
   
   g_free (dummy->text_uri);
-  
-  if (G_OBJECT_CLASS (g_dummy_file_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_dummy_file_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_dummy_file_parent_class)->finalize (object);
 }
 
 static void
index 8011a12..4dc51e6 100644 (file)
@@ -117,8 +117,8 @@ g_file_enumerator_dispose (GObject *object)
     g_object_unref (enumerator->priv->container);
     enumerator->priv->container = NULL;
   }
-  
-  (*G_OBJECT_CLASS (g_file_enumerator_parent_class)->dispose) (object);
+
+  G_OBJECT_CLASS (g_file_enumerator_parent_class)->dispose (object);
 }
 
 static void
@@ -131,8 +131,7 @@ g_file_enumerator_finalize (GObject *object)
   if (!enumerator->priv->closed)
     g_file_enumerator_close (enumerator, NULL, NULL);
 
-  if (G_OBJECT_CLASS (g_file_enumerator_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_file_enumerator_parent_class)->finalize) (object);
+  G_OBJECT_CLASS (g_file_enumerator_parent_class)->finalize (object);
 }
 
 static void
index 5d5cc1b..893b3a3 100644 (file)
@@ -73,9 +73,8 @@ g_file_icon_finalize (GObject *object)
   icon = G_FILE_ICON (object);
 
   g_object_unref (icon->file);
-  
-  if (G_OBJECT_CLASS (g_file_icon_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_file_icon_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_file_icon_parent_class)->finalize (object);
 }
 
 static void
index 33f7ca3..7e00e4d 100644 (file)
@@ -234,9 +234,8 @@ g_file_info_finalize (GObject *object)
 
   if (info->mask != NO_ATTRIBUTE_MASK)
     g_file_attribute_matcher_unref (info->mask);
-  
-  if (G_OBJECT_CLASS (g_file_info_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_file_info_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_file_info_parent_class)->finalize (object);
 }
 
 static void
index 1e65352..bf520ff 100644 (file)
@@ -156,9 +156,8 @@ g_file_monitor_finalize (GObject *object)
     }
 
   g_hash_table_destroy (monitor->priv->rate_limiter);
-  
-  if (G_OBJECT_CLASS (g_file_monitor_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_file_monitor_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_file_monitor_parent_class)->finalize (object);
 }
 
 static void
@@ -170,9 +169,8 @@ g_file_monitor_dispose (GObject *object)
 
   /* Make sure we cancel on last unref */
   g_file_monitor_cancel (monitor);
-  
-  if (G_OBJECT_CLASS (g_file_monitor_parent_class)->dispose)
-    (*G_OBJECT_CLASS (g_file_monitor_parent_class)->dispose) (object);
+
+  G_OBJECT_CLASS (g_file_monitor_parent_class)->dispose (object);
 }
 
 static void
index cccc722..05fc069 100644 (file)
@@ -85,9 +85,8 @@ g_filename_completer_finalize (GObject *object)
 
   g_list_foreach (completer->basenames, (GFunc)g_free, NULL);
   g_list_free (completer->basenames);
-  
-  if (G_OBJECT_CLASS (g_filename_completer_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_filename_completer_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_filename_completer_parent_class)->finalize (object);
 }
 
 static void
index 9d3581e..ba0892e 100644 (file)
@@ -185,8 +185,7 @@ g_filter_input_stream_finalize (GObject *object)
 
   g_object_unref (stream->base_stream);
 
-  if (G_OBJECT_CLASS (g_filter_input_stream_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_filter_input_stream_parent_class)->finalize) (object);
+  G_OBJECT_CLASS (g_filter_input_stream_parent_class)->finalize (object);
 }
 
 static void
index 385a59c..9a4518f 100644 (file)
@@ -89,8 +89,7 @@ g_input_stream_finalize (GObject *object)
   if (!stream->priv->closed)
     g_input_stream_close (stream, NULL, NULL);
 
-  if (G_OBJECT_CLASS (g_input_stream_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_input_stream_parent_class)->finalize) (object);
+  G_OBJECT_CLASS (g_input_stream_parent_class)->finalize (object);
 }
 
 static void
@@ -102,9 +101,8 @@ g_input_stream_dispose (GObject *object)
   
   if (!stream->priv->closed)
     g_input_stream_close (stream, NULL, NULL);
-  
-  if (G_OBJECT_CLASS (g_input_stream_parent_class)->dispose)
-    (*G_OBJECT_CLASS (g_input_stream_parent_class)->dispose) (object);
+
+  G_OBJECT_CLASS (g_input_stream_parent_class)->dispose (object);
 }
 
 
index 2d0cb59..35c9c1f 100644 (file)
@@ -58,8 +58,7 @@ g_local_directory_monitor_finalize (GObject *object)
       local_monitor->mount_monitor = NULL;
     }
 
-  if (G_OBJECT_CLASS (g_local_directory_monitor_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_local_directory_monitor_parent_class)->finalize) (object);
+  G_OBJECT_CLASS (g_local_directory_monitor_parent_class)->finalize (object);
 }
 
 static void
index 166a964..dac0cc7 100644 (file)
@@ -130,9 +130,8 @@ g_local_file_finalize (GObject *object)
   local = G_LOCAL_FILE (object);
 
   g_free (local->filename);
-  
-  if (G_OBJECT_CLASS (g_local_file_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_local_file_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_local_file_parent_class)->finalize (object);
 }
 
 static void
index 2f78ed2..48d8990 100644 (file)
@@ -128,9 +128,8 @@ g_local_file_enumerator_finalize (GObject *object)
     }
 
   free_entries (local);
-  
-  if (G_OBJECT_CLASS (g_local_file_enumerator_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_local_file_enumerator_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_local_file_enumerator_parent_class)->finalize (object);
 }
 
 
index 294ad07..75e6aae 100644 (file)
@@ -80,9 +80,8 @@ g_local_file_input_stream_finalize (GObject *object)
   GLocalFileInputStream *file;
   
   file = G_LOCAL_FILE_INPUT_STREAM (object);
-  
-  if (G_OBJECT_CLASS (g_local_file_input_stream_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_local_file_input_stream_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_local_file_input_stream_parent_class)->finalize (object);
 }
 
 static void
index d9517bc..9e1d841 100644 (file)
@@ -106,8 +106,7 @@ g_local_file_monitor_finalize (GObject *object)
       local_monitor->filename = NULL;
     }
 
-  if (G_OBJECT_CLASS (g_local_file_monitor_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_local_file_monitor_parent_class)->finalize) (object);
+  G_OBJECT_CLASS (g_local_file_monitor_parent_class)->finalize (object);
 }
 
 static void g_local_file_monitor_class_init (GLocalFileMonitorClass *klass)
index cc2b120..0cc7d26 100644 (file)
@@ -108,9 +108,8 @@ g_local_file_output_stream_finalize (GObject *object)
   g_free (file->priv->original_filename);
   g_free (file->priv->backup_filename);
   g_free (file->priv->etag);
-  
-  if (G_OBJECT_CLASS (g_local_file_output_stream_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_local_file_output_stream_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_local_file_output_stream_parent_class)->finalize (object);
 }
 
 static void
index 5dde34a..3121db6 100644 (file)
@@ -163,8 +163,7 @@ g_memory_input_stream_finalize (GObject *object)
   g_slist_foreach (priv->chunks, free_chunk, NULL);
   g_slist_free (priv->chunks);
 
-  if (G_OBJECT_CLASS (g_memory_input_stream_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_memory_input_stream_parent_class)->finalize) (object);
+  G_OBJECT_CLASS (g_memory_input_stream_parent_class)->finalize (object);
 }
 
 static void
index f497978..ca3d186 100644 (file)
@@ -136,9 +136,8 @@ g_memory_output_stream_finalize (GObject *object)
   
   if (priv->destroy)
     priv->destroy (priv->data);
-    
-  if (G_OBJECT_CLASS (g_memory_output_stream_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_memory_output_stream_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_memory_output_stream_parent_class)->finalize (object);
 }
 
 static void
index ef8ca21..3d906ce 100644 (file)
@@ -188,9 +188,8 @@ g_mount_operation_finalize (GObject *object)
   g_free (priv->password);
   g_free (priv->user);
   g_free (priv->domain);
-  
-  if (G_OBJECT_CLASS (g_mount_operation_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_mount_operation_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_mount_operation_parent_class)->finalize (object);
 }
 
 static gboolean
index c4d1b9f..ddaa115 100644 (file)
@@ -12,8 +12,7 @@ G_DEFINE_ABSTRACT_TYPE (GNativeVolumeMonitor, g_native_volume_monitor, G_TYPE_VO
 static void
 g_native_volume_monitor_finalize (GObject *object)
 {
-  if (G_OBJECT_CLASS (g_native_volume_monitor_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_native_volume_monitor_parent_class)->finalize) (object);
+  G_OBJECT_CLASS (g_native_volume_monitor_parent_class)->finalize (object);
 }
 
 
index f4d3102..051c0e8 100644 (file)
@@ -92,9 +92,8 @@ g_output_stream_finalize (GObject *object)
   GOutputStream *stream;
 
   stream = G_OUTPUT_STREAM (object);
-  
-  if (G_OBJECT_CLASS (g_output_stream_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_output_stream_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_output_stream_parent_class)->finalize (object);
 }
 
 static void
@@ -106,9 +105,8 @@ g_output_stream_dispose (GObject *object)
   
   if (!stream->priv->closed)
     g_output_stream_close (stream, NULL, NULL);
-  
-  if (G_OBJECT_CLASS (g_output_stream_parent_class)->dispose)
-    (*G_OBJECT_CLASS (g_output_stream_parent_class)->dispose) (object);
+
+  G_OBJECT_CLASS (g_output_stream_parent_class)->dispose (object);
 }
 
 static void
index 7f9e1b8..4c106e9 100644 (file)
@@ -53,8 +53,7 @@ g_poll_file_monitor_finalize (GObject* object)
 
   g_object_unref (poll_monitor->file);
 
-  if (G_OBJECT_CLASS (g_poll_file_monitor_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_poll_file_monitor_parent_class)->finalize) (object);
+  G_OBJECT_CLASS (g_poll_file_monitor_parent_class)->finalize (object);
 }
 
 
index 29666f1..d7d16fe 100644 (file)
@@ -155,9 +155,8 @@ g_simple_async_result_finalize (GObject *object)
 
   if (simple->error)
     g_error_free (simple->error);
-  
-  if (G_OBJECT_CLASS (g_simple_async_result_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_simple_async_result_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_simple_async_result_parent_class)->finalize (object);
 }
 
 static void
index 096a900..a2995a9 100644 (file)
@@ -181,9 +181,8 @@ g_themed_icon_finalize (GObject *object)
   themed = G_THEMED_ICON (object);
 
   g_strfreev (themed->names);
-  
-  if (G_OBJECT_CLASS (g_themed_icon_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_themed_icon_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_themed_icon_parent_class)->finalize (object);
 }
 
 static void
index afb487e..0d57cd2 100644 (file)
@@ -73,9 +73,7 @@ g_union_volume_monitor_finalize (GObject *object)
       g_object_unref (child_monitor);
     }
 
-  
-  if (G_OBJECT_CLASS (g_union_volume_monitor_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_union_volume_monitor_parent_class)->finalize) (object);
+  G_OBJECT_CLASS (g_union_volume_monitor_parent_class)->finalize (object);
 }
 
 static void
@@ -88,9 +86,8 @@ g_union_volume_monitor_dispose (GObject *object)
   g_static_rec_mutex_lock (&the_volume_monitor_mutex);
   the_volume_monitor = NULL;
   g_static_rec_mutex_unlock (&the_volume_monitor_mutex);
-  
-  if (G_OBJECT_CLASS (g_union_volume_monitor_parent_class)->dispose)
-    (*G_OBJECT_CLASS (g_union_volume_monitor_parent_class)->dispose) (object);
+
+  G_OBJECT_CLASS (g_union_volume_monitor_parent_class)->dispose (object);
 }
 
 static GList *
index 12ff5a5..4e7fbdc 100644 (file)
@@ -103,8 +103,7 @@ g_unix_input_stream_finalize (GObject *object)
   
   stream = G_UNIX_INPUT_STREAM (object);
 
-  if (G_OBJECT_CLASS (g_unix_input_stream_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_unix_input_stream_parent_class)->finalize) (object);
+  G_OBJECT_CLASS (g_unix_input_stream_parent_class)->finalize (object);
 }
 
 static void
index 6051164..0b13e7d 100644 (file)
@@ -82,9 +82,8 @@ g_unix_mount_finalize (GObject *object)
   g_free (mount->name);
   g_free (mount->device_path);
   g_free (mount->mount_path);
-  
-  if (G_OBJECT_CLASS (g_unix_mount_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_unix_mount_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_unix_mount_parent_class)->finalize (object);
 }
 
 static void
index 1713df3..f78f244 100644 (file)
@@ -1131,9 +1131,8 @@ g_unix_mount_monitor_finalize (GObject *object)
     }
 
   the_mount_monitor = NULL;
-  
-  if (G_OBJECT_CLASS (g_unix_mount_monitor_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_unix_mount_monitor_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_unix_mount_monitor_parent_class)->finalize (object);
 }
 
 
index 38842b6..1bca1ed 100644 (file)
@@ -95,8 +95,7 @@ g_unix_output_stream_finalize (GObject *object)
   
   stream = G_UNIX_OUTPUT_STREAM (object);
 
-  if (G_OBJECT_CLASS (g_unix_output_stream_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_unix_output_stream_parent_class)->finalize) (object);
+  G_OBJECT_CLASS (g_unix_output_stream_parent_class)->finalize (object);
 }
 
 static void
index 7f8cbc1..766e1b2 100644 (file)
@@ -83,8 +83,7 @@ g_unix_volume_finalize (GObject *object)
   g_free (volume->identifier);
   g_free (volume->identifier_type);
 
-  if (G_OBJECT_CLASS (g_unix_volume_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_unix_volume_parent_class)->finalize) (object);
+  G_OBJECT_CLASS (g_unix_volume_parent_class)->finalize (object);
 }
 
 static void
index fcd90fb..a7c4460 100644 (file)
@@ -84,9 +84,8 @@ g_unix_volume_monitor_finalize (GObject *object)
   g_list_free (monitor->volumes);
   g_list_foreach (monitor->mounts, (GFunc)g_object_unref, NULL);
   g_list_free (monitor->mounts);
-  
-  if (G_OBJECT_CLASS (g_unix_volume_monitor_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_unix_volume_monitor_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_unix_volume_monitor_parent_class)->finalize (object);
 }
 
 static GList *
index 1ea4aaf..8e0223a 100644 (file)
@@ -66,8 +66,7 @@ g_volume_monitor_finalize (GObject *object)
 
   monitor = G_VOLUME_MONITOR (object);
 
-  if (G_OBJECT_CLASS (g_volume_monitor_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_volume_monitor_parent_class)->finalize) (object);
+  G_OBJECT_CLASS (g_volume_monitor_parent_class)->finalize (object);
 }
 
 static void
index d9ec404..a01022f 100644 (file)
@@ -79,9 +79,8 @@ g_win32_app_info_finalize (GObject *object)
   g_free (info->id_utf8);
   g_free (info->name);
   g_free (info->executable);
-  
-  if (G_OBJECT_CLASS (g_win32_app_info_parent_class)->finalize)
-    (*G_OBJECT_CLASS (g_win32_app_info_parent_class)->finalize) (object);
+
+  G_OBJECT_CLASS (g_win32_app_info_parent_class)->finalize (object);
 }
 
 static void