+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:
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
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
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
_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
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
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
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
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
}
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
/* 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
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
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
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
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);
}
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
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
}
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);
}
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
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)
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
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
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
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
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);
}
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
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
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);
}
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
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
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
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 *
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
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
}
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);
}
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
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
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 *
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
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