Commit a4427bff authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

chain up unconditionally in finalize() and dispose(). Also don't

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
parent b2071469
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:
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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);
}
......
......@@ -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
......
......@@ -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
......
......@@ -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);
}
......
......@@ -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
......
......@@ -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)
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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);
}
......
......@@ -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
......
......@@ -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);
}
......
......@@ -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
......
......@@ -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
......
......@@ -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 *
......
......@@ -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
......
......@@ -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
......
......@@ -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);
}
......
......@@ -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
......
......@@ -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
......
......@@ -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 *
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment