Commit 72087a0a authored by Christian Hergert's avatar Christian Hergert

use dzl_clear_pointer()

This is a new macro in libdazzle that tries to be
better about checking types of the free callback.

It's caught a couple of bugs already, so we should
get used to using this.
parent 3989c526
Pipeline #16265 passed with stage
in 17 minutes and 43 seconds
......@@ -485,8 +485,8 @@ ide_application_local_command_line (GApplication *application,
g_application_activate (application);
cleanup:
g_clear_pointer (&plugin, g_free);
g_clear_pointer (&dbus_address, g_free);
dzl_clear_pointer (&plugin, g_free);
dzl_clear_pointer (&dbus_address, g_free);
g_clear_error (&error);
g_option_context_free (context);
......
......@@ -74,7 +74,7 @@ ide_application_run_tests_cb (GObject *object,
else
g_application_release (G_APPLICATION (test->self));
g_clear_pointer (&test->name, g_free);
dzl_clear_pointer (&test->name, g_free);
g_clear_object (&test->self);
g_slice_free (AsyncTest, test);
}
......
......@@ -100,15 +100,15 @@ ide_application_make_skeleton_dirs (IdeApplication *self)
path = g_build_filename (g_get_user_data_dir (), "gnome-builder", NULL);
g_mkdir_with_parents (path, 0750);
g_clear_pointer (&path, g_free);
dzl_clear_pointer (&path, g_free);
path = g_build_filename (g_get_user_config_dir (), "gnome-builder", NULL);
g_mkdir_with_parents (path, 0750);
g_clear_pointer (&path, g_free);
dzl_clear_pointer (&path, g_free);
path = g_build_filename (g_get_user_config_dir (), "gnome-builder", "snippets", NULL);
g_mkdir_with_parents (path, 0750);
g_clear_pointer (&path, g_free);
dzl_clear_pointer (&path, g_free);
projects_dir = ide_application_get_projects_directory (self);
g_assert (G_IS_FILE (projects_dir));
......@@ -633,14 +633,14 @@ ide_application_finalize (GObject *object)
{
IdeApplication *self = (IdeApplication *)object;
g_clear_pointer (&self->test_funcs, g_list_free);
g_clear_pointer (&self->dbus_address, g_free);
g_clear_pointer (&self->tool_arguments, g_strfreev);
g_clear_pointer (&self->started_at, g_date_time_unref);
g_clear_pointer (&self->plugin_css, g_hash_table_unref);
g_clear_pointer (&self->plugin_settings, g_hash_table_unref);
g_clear_pointer (&self->reapers, g_ptr_array_unref);
g_clear_pointer (&self->plugin_gresources, g_hash_table_unref);
dzl_clear_pointer (&self->test_funcs, g_list_free);
dzl_clear_pointer (&self->dbus_address, g_free);
dzl_clear_pointer (&self->tool_arguments, g_strfreev);
dzl_clear_pointer (&self->started_at, g_date_time_unref);
dzl_clear_pointer (&self->plugin_css, g_hash_table_unref);
dzl_clear_pointer (&self->plugin_settings, g_hash_table_unref);
dzl_clear_pointer (&self->reapers, g_ptr_array_unref);
dzl_clear_pointer (&self->plugin_gresources, g_hash_table_unref);
g_clear_object (&self->worker_manager);
g_clear_object (&self->keybindings);
g_clear_object (&self->recent_projects);
......
......@@ -136,8 +136,8 @@ edit_state_free (gpointer data)
if (state != NULL)
{
g_clear_pointer (&state->edits, g_ptr_array_unref);
g_clear_pointer (&state->buffers, g_hash_table_unref);
dzl_clear_pointer (&state->edits, g_ptr_array_unref);
dzl_clear_pointer (&state->buffers, g_hash_table_unref);
g_slice_free (EditState, state);
}
}
......@@ -1369,9 +1369,9 @@ ide_buffer_manager_finalize (GObject *object)
if (self->buffers->len)
g_warning ("Not all buffers have been destroyed.");
g_clear_pointer (&self->buffers, g_ptr_array_unref);
g_clear_pointer (&self->loading, g_hash_table_unref);
g_clear_pointer (&self->timeouts, g_hash_table_unref);
dzl_clear_pointer (&self->buffers, g_ptr_array_unref);
dzl_clear_pointer (&self->loading, g_hash_table_unref);
dzl_clear_pointer (&self->timeouts, g_hash_table_unref);
g_clear_object (&self->settings);
G_OBJECT_CLASS (ide_buffer_manager_parent_class)->finalize (object);
......
......@@ -168,9 +168,9 @@ lookup_symbol_task_data_free (LookUpSymbolData *data)
{
g_assert (IDE_IS_MAIN_THREAD ());
g_clear_pointer (&data->resolvers, g_ptr_array_unref);
g_clear_pointer (&data->location, ide_source_location_unref);
g_clear_pointer (&data->symbol, ide_symbol_unref);
dzl_clear_pointer (&data->resolvers, g_ptr_array_unref);
dzl_clear_pointer (&data->location, ide_source_location_unref);
dzl_clear_pointer (&data->symbol, ide_symbol_unref);
g_slice_free (LookUpSymbolData, data);
}
......@@ -607,7 +607,7 @@ ide_buffer_set_diagnostics (IdeBuffer *self,
{
ide_buffer_clear_diagnostics (self);
g_clear_pointer (&priv->diagnostics, ide_diagnostics_unref);
dzl_clear_pointer (&priv->diagnostics, ide_diagnostics_unref);
if (diagnostics != NULL)
{
......@@ -782,7 +782,7 @@ ide_buffer_changed (GtkTextBuffer *buffer)
priv->change_count++;
g_clear_pointer (&priv->content, g_bytes_unref);
dzl_clear_pointer (&priv->content, g_bytes_unref);
ide_buffer_delay_settling (self);
}
......@@ -1547,7 +1547,7 @@ ide_buffer_dispose (GObject *object)
dzl_clear_source (&priv->reclamation_handler);
dzl_clear_source (&priv->check_modified_timeout);
g_clear_pointer (&priv->failure, g_error_free);
dzl_clear_pointer (&priv->failure, g_error_free);
if (priv->context != NULL)
{
......@@ -1576,8 +1576,8 @@ ide_buffer_dispose (GObject *object)
if (priv->diagnostics_manager_signals != NULL)
dzl_signal_group_set_target (priv->diagnostics_manager_signals, NULL);
g_clear_pointer (&priv->diagnostics_line_cache, g_hash_table_unref);
g_clear_pointer (&priv->diagnostics, ide_diagnostics_unref);
dzl_clear_pointer (&priv->diagnostics_line_cache, g_hash_table_unref);
dzl_clear_pointer (&priv->diagnostics, ide_diagnostics_unref);
g_clear_object (&priv->diagnostics_manager_signals);
g_clear_object (&priv->addins);
g_clear_object (&priv->highlight_engine);
......@@ -1602,8 +1602,8 @@ ide_buffer_finalize (GObject *object)
g_clear_object (&priv->file_signals);
g_clear_object (&priv->file);
g_clear_pointer (&priv->title, g_free);
g_clear_pointer (&priv->content, g_bytes_unref);
dzl_clear_pointer (&priv->title, g_free);
dzl_clear_pointer (&priv->content, g_bytes_unref);
if (priv->context != NULL)
{
......@@ -1991,7 +1991,7 @@ ide_buffer_update_title (IdeBuffer *self)
title = g_file_get_path (gfile);
}
g_clear_pointer (&priv->title, g_free);
dzl_clear_pointer (&priv->title, g_free);
priv->title = g_strdup (title);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_TITLE]);
}
......@@ -2822,7 +2822,7 @@ ide_buffer_get_symbol_at_location_cb (GObject *object,
(ide_symbol_get_definition_location (data->symbol) == NULL &&
ide_symbol_get_declaration_location (symbol)))
{
g_clear_pointer (&data->symbol, ide_symbol_unref);
dzl_clear_pointer (&data->symbol, ide_symbol_unref);
data->symbol = g_steal_pointer (&symbol);
}
}
......@@ -3378,7 +3378,7 @@ _ide_buffer_set_failure (IdeBuffer *self,
ide_context_warning (priv->context, _("Buffer failed: %s"), error->message);
priv->failed = !!error;
g_clear_pointer (&priv->failure, g_error_free);
dzl_clear_pointer (&priv->failure, g_error_free);
priv->failure = g_error_copy (error);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_FAILED]);
}
......
......@@ -133,8 +133,8 @@ ide_unsaved_file_unref (IdeUnsavedFile *self)
if (g_atomic_int_dec_and_test (&self->ref_count))
{
g_clear_pointer (&self->temp_path, g_free);
g_clear_pointer (&self->content, g_bytes_unref);
dzl_clear_pointer (&self->temp_path, g_free);
dzl_clear_pointer (&self->content, g_bytes_unref);
g_clear_object (&self->file);
g_slice_free (IdeUnsavedFile, self);
}
......
......@@ -96,8 +96,8 @@ async_state_free (gpointer data)
if (state != NULL)
{
g_clear_pointer (&state->drafts_directory, g_free);
g_clear_pointer (&state->unsaved_files, g_ptr_array_unref);
dzl_clear_pointer (&state->drafts_directory, g_free);
dzl_clear_pointer (&state->unsaved_files, g_ptr_array_unref);
g_slice_free (AsyncState, state);
}
}
......@@ -112,12 +112,12 @@ unsaved_file_free (gpointer data)
if (uf != NULL)
{
g_clear_object (&uf->file);
g_clear_pointer (&uf->content, g_bytes_unref);
dzl_clear_pointer (&uf->content, g_bytes_unref);
if (uf->temp_path != NULL)
{
g_unlink (uf->temp_path);
g_clear_pointer (&uf->temp_path, g_free);
dzl_clear_pointer (&uf->temp_path, g_free);
}
if (uf->temp_fd != -1)
......@@ -645,7 +645,7 @@ ide_unsaved_files_update_locked (IdeUnsavedFiles *self,
{
if (content != unsaved->content)
{
g_clear_pointer (&unsaved->content, g_bytes_unref);
dzl_clear_pointer (&unsaved->content, g_bytes_unref);
unsaved->content = g_bytes_ref (content);
unsaved->sequence = self->sequence;
}
......@@ -826,7 +826,7 @@ ide_unsaved_files_finalize (GObject *object)
g_assert (IDE_IS_MAIN_THREAD ());
g_mutex_clear (&self->mutex);
g_clear_pointer (&self->unsaved_files, g_ptr_array_unref);
dzl_clear_pointer (&self->unsaved_files, g_ptr_array_unref);
G_OBJECT_CLASS (ide_unsaved_files_parent_class)->finalize (object);
}
......
......@@ -747,8 +747,8 @@ ide_buildconfig_configuration_provider_finalize (GObject *object)
{
IdeBuildconfigConfigurationProvider *self = (IdeBuildconfigConfigurationProvider *)object;
g_clear_pointer (&self->configs, g_ptr_array_unref);
g_clear_pointer (&self->key_file, g_key_file_free);
dzl_clear_pointer (&self->configs, g_ptr_array_unref);
dzl_clear_pointer (&self->key_file, g_key_file_free);
G_OBJECT_CLASS (ide_buildconfig_configuration_provider_parent_class)->finalize (object);
}
......
......@@ -20,6 +20,8 @@
#include "config.h"
#include <dazzle.h>
#include "buildconfig/ide-buildconfig-configuration.h"
struct _IdeBuildconfigConfiguration
......@@ -46,8 +48,8 @@ ide_buildconfig_configuration_finalize (GObject *object)
{
IdeBuildconfigConfiguration *self = (IdeBuildconfigConfiguration *)object;
g_clear_pointer (&self->prebuild, g_strfreev);
g_clear_pointer (&self->postbuild, g_strfreev);
dzl_clear_pointer (&self->prebuild, g_strfreev);
dzl_clear_pointer (&self->postbuild, g_strfreev);
G_OBJECT_CLASS (ide_buildconfig_configuration_parent_class)->finalize (object);
}
......
......@@ -110,9 +110,9 @@ ide_build_log_finalize (GObject *object)
{
IdeBuildLog *self = (IdeBuildLog *)object;
g_clear_pointer (&self->log_queue, g_async_queue_unref);
g_clear_pointer (&self->log_source, g_source_destroy);
g_clear_pointer (&self->observers, g_array_unref);
dzl_clear_pointer (&self->log_queue, g_async_queue_unref);
dzl_clear_pointer (&self->log_source, g_source_destroy);
dzl_clear_pointer (&self->observers, g_array_unref);
G_OBJECT_CLASS (ide_build_log_parent_class)->finalize (object);
}
......
......@@ -553,7 +553,7 @@ ide_build_manager_invalidate_pipeline (IdeBuildManager *self)
g_clear_object (&self->pipeline);
g_clear_pointer (&self->running_time, g_timer_destroy);
dzl_clear_pointer (&self->running_time, g_timer_destroy);
self->diagnostic_count = 0;
self->error_count = 0;
......@@ -775,9 +775,9 @@ ide_build_manager_finalize (GObject *object)
g_clear_object (&self->pipeline);
g_clear_object (&self->pipeline_signals);
g_clear_object (&self->cancellable);
g_clear_pointer (&self->last_build_time, g_date_time_unref);
g_clear_pointer (&self->running_time, g_timer_destroy);
g_clear_pointer (&self->branch_name, g_free);
dzl_clear_pointer (&self->last_build_time, g_date_time_unref);
dzl_clear_pointer (&self->running_time, g_timer_destroy);
dzl_clear_pointer (&self->branch_name, g_free);
dzl_clear_source (&self->timer_source);
......@@ -1447,7 +1447,7 @@ ide_build_manager_execute_async (IdeBuildManager *self,
*/
if ((phase & IDE_BUILD_PHASE_MASK) >= IDE_BUILD_PHASE_BUILD)
{
g_clear_pointer (&self->last_build_time, g_date_time_unref);
dzl_clear_pointer (&self->last_build_time, g_date_time_unref);
self->last_build_time = g_date_time_new_now_local ();
self->diagnostic_count = 0;
self->warning_count = 0;
......
......@@ -392,7 +392,7 @@ idle_load_state_free (gpointer data)
{
IdleLoadState *state = data;
g_clear_pointer (&state->addins, g_ptr_array_unref);
dzl_clear_pointer (&state->addins, g_ptr_array_unref);
g_clear_object (&state->self);
g_slice_free (IdleLoadState, state);
}
......@@ -405,7 +405,7 @@ task_data_free (gpointer data)
if (td != NULL)
{
if (td->type == TASK_CLEAN)
g_clear_pointer (&td->clean.stages, g_ptr_array_unref);
dzl_clear_pointer (&td->clean.stages, g_ptr_array_unref);
td->type = 0;
td->task = NULL;
g_slice_free (TaskData, td);
......@@ -435,7 +435,7 @@ clear_error_format (gpointer data)
ErrorFormat *errfmt = data;
errfmt->id = 0;
g_clear_pointer (&errfmt->regex, g_regex_unref);
dzl_clear_pointer (&errfmt->regex, g_regex_unref);
}
static inline const gchar *
......@@ -1305,14 +1305,14 @@ ide_build_pipeline_finalize (GObject *object)
g_clear_object (&self->runtime);
g_clear_object (&self->toolchain);
g_clear_object (&self->configuration);
g_clear_pointer (&self->pipeline, g_array_unref);
g_clear_pointer (&self->srcdir, g_free);
g_clear_pointer (&self->builddir, g_free);
g_clear_pointer (&self->errfmts, g_array_unref);
g_clear_pointer (&self->errfmt_top_dir, g_free);
g_clear_pointer (&self->errfmt_current_dir, g_free);
g_clear_pointer (&self->chained_bindings, g_ptr_array_free);
g_clear_pointer (&self->host_triplet, ide_triplet_unref);
dzl_clear_pointer (&self->pipeline, g_array_unref);
dzl_clear_pointer (&self->srcdir, g_free);
dzl_clear_pointer (&self->builddir, g_free);
dzl_clear_pointer (&self->errfmts, g_array_unref);
dzl_clear_pointer (&self->errfmt_top_dir, g_free);
dzl_clear_pointer (&self->errfmt_current_dir, g_free);
dzl_clear_pointer (&self->chained_bindings, g_ptr_array_unref);
dzl_clear_pointer (&self->host_triplet, ide_triplet_unref);
G_OBJECT_CLASS (ide_build_pipeline_parent_class)->finalize (object);
......@@ -1333,7 +1333,7 @@ ide_build_pipeline_dispose (GObject *object)
ide_build_pipeline_unload (self);
g_clear_pointer (&self->message, g_free);
dzl_clear_pointer (&self->message, g_free);
g_clear_object (&self->pty);
fd = pty_fd_steal (&self->pty_slave);
......@@ -1695,7 +1695,7 @@ ide_build_pipeline_stage_execute_cb (GObject *object,
ide_build_stage_set_completed (stage, !self->failed);
g_clear_pointer (&self->chained_bindings, g_ptr_array_free);
dzl_clear_pointer (&self->chained_bindings, g_ptr_array_unref);
self->chained_bindings = g_ptr_array_new_with_free_func (g_object_unref);
if (self->failed == FALSE)
......@@ -1815,8 +1815,8 @@ ide_build_pipeline_tick_execute (IdeBuildPipeline *self,
_ide_build_pipeline_set_message (self, NULL);
/* Clear cached directory enter/leave tracking */
g_clear_pointer (&self->errfmt_current_dir, g_free);
g_clear_pointer (&self->errfmt_top_dir, g_free);
dzl_clear_pointer (&self->errfmt_current_dir, g_free);
dzl_clear_pointer (&self->errfmt_top_dir, g_free);
/* Short circuit now if the task was cancelled */
if (ide_task_return_error_if_cancelled (task))
......@@ -1896,7 +1896,7 @@ ide_build_pipeline_task_notify_completed (IdeBuildPipeline *self,
self->requested_mask = 0;
self->in_clean = FALSE;
g_clear_pointer (&self->message, g_free);
dzl_clear_pointer (&self->message, g_free);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_MESSAGE]);
/*
......@@ -2179,7 +2179,7 @@ ide_build_pipeline_do_flush (gpointer data)
self->in_clean = (task_data->type == TASK_CLEAN);
/* Clear any lingering message */
g_clear_pointer (&self->message, g_free);
dzl_clear_pointer (&self->message, g_free);
/*
* The following logs some helpful information about the build to our
......@@ -3754,7 +3754,7 @@ _ide_build_pipeline_set_runtime (IdeBuildPipeline *self,
context = ide_object_get_context (IDE_OBJECT (self));
build_system = ide_context_get_build_system (context);
g_clear_pointer (&self->builddir, g_free);
dzl_clear_pointer (&self->builddir, g_free);
self->builddir = ide_build_system_get_builddir (build_system, self);
}
}
......@@ -3799,7 +3799,7 @@ _ide_build_pipeline_check_toolchain (IdeBuildPipeline *self,
if (self->host_triplet != device_triplet)
{
g_clear_pointer (&self->host_triplet, ide_triplet_unref);
dzl_clear_pointer (&self->host_triplet, ide_triplet_unref);
self->host_triplet = ide_triplet_ref (device_triplet);
}
......
......@@ -52,7 +52,7 @@ clear_path (gpointer data)
{
Path *p = data;
g_clear_pointer (&p->path, g_free);
dzl_clear_pointer (&p->path, g_free);
}
static void
......@@ -165,7 +165,7 @@ ide_build_stage_mkdirs_finalize (GObject *object)
IdeBuildStageMkdirs *self = (IdeBuildStageMkdirs *)object;
IdeBuildStageMkdirsPrivate *priv = ide_build_stage_mkdirs_get_instance_private (self);
g_clear_pointer (&priv->paths, g_array_unref);
dzl_clear_pointer (&priv->paths, g_array_unref);
G_OBJECT_CLASS (ide_build_stage_mkdirs_parent_class)->finalize (object);
}
......
......@@ -258,8 +258,8 @@ ide_build_stage_finalize (GObject *object)
ide_build_stage_clear_observer (self);
g_clear_pointer (&priv->name, g_free);
g_clear_pointer (&priv->stdout_path, g_free);
dzl_clear_pointer (&priv->name, g_free);
dzl_clear_pointer (&priv->stdout_path, g_free);
g_clear_object (&priv->queued_execute);
g_clear_object (&priv->stdout_stream);
......
......@@ -57,8 +57,8 @@ static GParamSpec *properties [N_PROPS];
static void
get_build_flags_data_free (GetBuildFlagsData *data)
{
g_clear_pointer (&data->files, g_ptr_array_unref);
g_clear_pointer (&data->flags, g_hash_table_unref);
dzl_clear_pointer (&data->files, g_ptr_array_unref);
dzl_clear_pointer (&data->flags, g_hash_table_unref);
g_slice_free (GetBuildFlagsData, data);
}
......
......@@ -20,6 +20,8 @@
#include "config.h"
#include <dazzle.h>
#include "buildsystem/ide-build-target.h"
G_DEFINE_INTERFACE (IdeBuildTarget, ide_build_target, IDE_TYPE_OBJECT)
......@@ -132,7 +134,7 @@ ide_build_target_get_argv (IdeBuildTarget *self)
g_autofree gchar *name = ide_build_target_get_name (self);
g_autoptr(GFile) dir = ide_build_target_get_install_directory (self);
g_clear_pointer (&argv, g_strfreev);
dzl_clear_pointer (&argv, g_strfreev);
if (!g_path_is_absolute (name) && dir != NULL && g_file_is_native (dir))
{
......
......@@ -97,7 +97,7 @@ compile_info_free (gpointer data)
{
g_clear_object (&info->directory);
g_clear_object (&info->file);
g_clear_pointer (&info->command, g_free);
dzl_clear_pointer (&info->command, g_free);
g_slice_free (CompileInfo, info);
}
}
......@@ -107,8 +107,8 @@ ide_compile_commands_finalize (GObject *object)
{
IdeCompileCommands *self = (IdeCompileCommands *)object;
g_clear_pointer (&self->info_by_file, g_hash_table_unref);
g_clear_pointer (&self->vala_info, g_ptr_array_unref);
dzl_clear_pointer (&self->info_by_file, g_hash_table_unref);
dzl_clear_pointer (&self->vala_info, g_ptr_array_unref);
G_OBJECT_CLASS (ide_compile_commands_parent_class)->finalize (object);
}
......
......@@ -20,6 +20,8 @@
#include "config.h"
#include <dazzle.h>
#include "buildsystem/ide-environment-variable.h"
struct _IdeEnvironmentVariable
......@@ -45,8 +47,8 @@ ide_environment_variable_finalize (GObject *object)
{
IdeEnvironmentVariable *self = (IdeEnvironmentVariable *)object;
g_clear_pointer (&self->key, g_free);
g_clear_pointer (&self->value, g_free);
dzl_clear_pointer (&self->key, g_free);
dzl_clear_pointer (&self->value, g_free);
G_OBJECT_CLASS (ide_environment_variable_parent_class)->finalize (object);
}
......
......@@ -20,6 +20,8 @@
#include "config.h"
#include <dazzle.h>
#include "buildsystem/ide-environment.h"
#include "buildsystem/ide-environment-variable.h"
......@@ -46,7 +48,7 @@ ide_environment_finalize (GObject *object)
{
IdeEnvironment *self = (IdeEnvironment *)object;
g_clear_pointer (&self->variables, g_ptr_array_unref);
dzl_clear_pointer (&self->variables, g_ptr_array_unref);
G_OBJECT_CLASS (ide_environment_parent_class)->finalize (object);
}
......
......@@ -20,6 +20,8 @@
#include "config.h"
#include <dazzle.h>
#include "buildsystem/ide-build-target.h"
#include "buildsystem/ide-simple-build-target.h"
......@@ -47,10 +49,10 @@ ide_simple_build_target_finalize (GObject *object)
IdeSimpleBuildTargetPrivate *priv = ide_simple_build_target_get_instance_private (self);
g_clear_object (&priv->install_directory);
g_clear_pointer (&priv->name, g_free);
g_clear_pointer (&priv->argv, g_strfreev);
g_clear_pointer (&priv->cwd, g_free);
g_clear_pointer (&priv->language, g_free);
dzl_clear_pointer (&priv->name, g_free);
dzl_clear_pointer (&priv->argv, g_strfreev);
dzl_clear_pointer (&priv->cwd, g_free);
dzl_clear_pointer (&priv->language, g_free);
G_OBJECT_CLASS (ide_simple_build_target_parent_class)->finalize (object);
}
......
......@@ -325,9 +325,9 @@ ide_build_configuration_view_disconnect (IdeBuildConfigurationView *self,
gtk_list_box_bind_model (self->runtime_list_box, NULL, NULL, NULL, NULL);
g_clear_pointer (&self->configure_binding, g_binding_unbind);
g_clear_pointer (&self->display_name_binding, g_binding_unbind);
g_clear_pointer (&self->prefix_binding, g_binding_unbind);
dzl_clear_pointer (&self->configure_binding, g_binding_unbind);
dzl_clear_pointer (&self->display_name_binding, g_binding_unbind);
dzl_clear_pointer (&self->prefix_binding, g_binding_unbind);
}
static void
......
......@@ -545,7 +545,7 @@ ide_build_panel_destroy (GtkWidget *widget)
if (self->pipeline_signals != NULL)
dzl_signal_group_set_target (self->pipeline_signals, NULL);
g_clear_pointer (&self->diags_hash, g_hash_table_unref);
dzl_clear_pointer (&self->diags_hash, g_hash_table_unref);
g_clear_object (&self->pipeline_signals);
g_clear_object (&self->pipeline);
......
......@@ -86,8 +86,8 @@ ide_environment_editor_row_disconnect (IdeEnvironmentEditorRow *self)
g_assert (IDE_IS_ENVIRONMENT_EDITOR_ROW (self));
g_assert (IDE_IS_ENVIRONMENT_VARIABLE (self->variable));
g_clear_pointer (&self->key_binding, g_binding_unbind);
g_clear_pointer (&self->value_binding, g_binding_unbind);
dzl_clear_pointer (&self->key_binding, g_binding_unbind);
dzl_clear_pointer (&self->value_binding, g_binding_unbind);
}
static void
......
......@@ -175,7 +175,7 @@ ide_completion_context_dispose (GObject *object)
{
IdeCompletionContext *self = (IdeCompletionContext *)object;
g_clear_pointer (&self->providers, g_array_unref);
dzl_clear_pointer (&self->providers, g_array_unref);
g_clear_object (&self->completion);
if (self->begin_mark != NULL)
......
......@@ -314,7 +314,7 @@ ide_completion_list_box_finalize (GObject *object)
g_clear_object (&self->right_size_group);
g_clear_object (&self->hadjustment);
g_clear_object (&self->vadjustment);
g_clear_pointer (&self->font_attrs, pango_attr_list_unref);
dzl_clear_pointer (&self->font_attrs, pango_attr_list_unref);
G_OBJECT_CLASS (ide_completion_list_box_parent_class)->finalize (object);
}
......@@ -921,7 +921,7 @@ _ide_completion_list_box_set_font_desc (IdeCompletionListBox *self,
{
g_return_if_fail (IDE_IS_COMPLETION_LIST_BOX (self));
g_clear_pointer (&self->font_attrs, pango_attr_list_unref);
dzl_clear_pointer (&self->font_attrs, pango_attr_list_unref);
if (font_desc)
{
......
......@@ -978,8 +978,8 @@ ide_completion_finalize (GObject *object)
g_clear_object (&self->view_signals);
g_clear_object (&self->context);
g_clear_object (&self->cancellable);
g_clear_pointer (&self->providers, g_ptr_array_unref);
g_clear_pointer (&self->font_desc, pango_font_description_free);
dzl_clear_pointer (&self->providers, g_ptr_array_unref);
dzl_clear_pointer (&self->font_desc, pango_font_description_free);
g_clear_weak_pointer (&self->view);
G_OBJECT_CLASS (ide_completion_parent_class)->finalize (object);
......
......@@ -298,7 +298,7 @@ ide_configuration_manager_finalize (GObject *object)
g_clear_object (&self->current);
g_clear_object (&self->cancellable);
g_clear_pointer (&self->configs, g_array_unref);
dzl_clear_pointer (&self->configs, g_array_unref);
G_OBJECT_CLASS (ide_configuration_manager_parent_class)->finalize (object);
}
......
......@@ -271,15 +271,15 @@ ide_configuration_finalize (GObject *object)
g_clear_object (&priv->build_commands_dir);
g_clear_object (&priv->environment);