[gnome-builder] variant: use take_ref() where appropriate
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] variant: use take_ref() where appropriate
- Date: Thu, 16 Aug 2018 22:36:18 +0000 (UTC)
commit 84b0432fc00811ef8828933fabd1b3178ddf83ec
Author: Christian Hergert <chergert redhat com>
Date: Thu Aug 16 15:30:45 2018 -0700
variant: use take_ref() where appropriate
src/libide/diagnostics/ide-diagnostic.c | 2 +-
src/libide/diagnostics/ide-fixit.c | 2 +-
src/libide/diagnostics/ide-source-location.c | 2 +-
src/libide/diagnostics/ide-source-range.c | 2 +-
src/libide/highlighting/ide-highlight-index.c | 2 +-
src/libide/subprocess/ide-breakout-subprocess.c | 2 +-
src/libide/symbols/ide-symbol.c | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/libide/diagnostics/ide-diagnostic.c b/src/libide/diagnostics/ide-diagnostic.c
index 1fa493c12..fd865ab08 100644
--- a/src/libide/diagnostics/ide-diagnostic.c
+++ b/src/libide/diagnostics/ide-diagnostic.c
@@ -504,7 +504,7 @@ ide_diagnostic_to_variant (const IdeDiagnostic *self)
g_variant_dict_insert_value (&dict, "fixits", g_variant_builder_end (&builder));
}
- return g_variant_ref_sink (g_variant_dict_end (&dict));
+ return g_variant_take_ref (g_variant_dict_end (&dict));
}
/**
diff --git a/src/libide/diagnostics/ide-fixit.c b/src/libide/diagnostics/ide-fixit.c
index 925eb5b46..736b918a0 100644
--- a/src/libide/diagnostics/ide-fixit.c
+++ b/src/libide/diagnostics/ide-fixit.c
@@ -149,7 +149,7 @@ ide_fixit_to_variant (const IdeFixit *self)
if ((vrange = ide_source_range_to_variant (self->range)))
g_variant_dict_insert_value (&dict, "range", vrange);
- return g_variant_ref_sink (g_variant_dict_end (&dict));
+ return g_variant_take_ref (g_variant_dict_end (&dict));
}
/**
diff --git a/src/libide/diagnostics/ide-source-location.c b/src/libide/diagnostics/ide-source-location.c
index 73d6808dc..d00db38c2 100644
--- a/src/libide/diagnostics/ide-source-location.c
+++ b/src/libide/diagnostics/ide-source-location.c
@@ -333,5 +333,5 @@ ide_source_location_to_variant (const IdeSourceLocation *self)
g_variant_dict_insert (&dict, "line-offset", "u", self->line_offset);
g_variant_dict_insert (&dict, "offset", "u", self->offset);
- return g_variant_ref_sink (g_variant_dict_end (&dict));
+ return g_variant_take_ref (g_variant_dict_end (&dict));
}
diff --git a/src/libide/diagnostics/ide-source-range.c b/src/libide/diagnostics/ide-source-range.c
index c9531005f..ffd4c8595 100644
--- a/src/libide/diagnostics/ide-source-range.c
+++ b/src/libide/diagnostics/ide-source-range.c
@@ -168,7 +168,7 @@ ide_source_range_to_variant (const IdeSourceRange *self)
g_variant_dict_insert_value (&dict, "end", end);
}
- return g_variant_ref_sink (g_variant_dict_end (&dict));
+ return g_variant_take_ref (g_variant_dict_end (&dict));
}
IdeSourceRange *
diff --git a/src/libide/highlighting/ide-highlight-index.c b/src/libide/highlighting/ide-highlight-index.c
index 0ee5f3cfc..62347e709 100644
--- a/src/libide/highlighting/ide-highlight-index.c
+++ b/src/libide/highlighting/ide-highlight-index.c
@@ -252,5 +252,5 @@ ide_highlight_index_to_variant (IdeHighlightIndex *self)
g_variant_dict_insert_value (&dict, k, g_steal_pointer (&keys));
}
- return g_variant_ref_sink (g_variant_dict_end (&dict));
+ return g_variant_take_ref (g_variant_dict_end (&dict));
}
diff --git a/src/libide/subprocess/ide-breakout-subprocess.c b/src/libide/subprocess/ide-breakout-subprocess.c
index a12248ecb..d628397fa 100644
--- a/src/libide/subprocess/ide-breakout-subprocess.c
+++ b/src/libide/subprocess/ide-breakout-subprocess.c
@@ -1476,7 +1476,7 @@ ide_breakout_subprocess_initable_init (GInitable *initable,
g_variant_builder_end (g_steal_pointer (&fd_builder)),
g_variant_builder_end (g_steal_pointer (&env_builder)),
self->clear_env ? FLATPAK_HOST_COMMAND_FLAGS_CLEAR_ENV : 0);
- g_variant_ref_sink (params);
+ g_variant_take_ref (params);
#ifdef IDE_ENABLE_TRACE
{
diff --git a/src/libide/symbols/ide-symbol.c b/src/libide/symbols/ide-symbol.c
index c8dfdbf45..1265f3317 100644
--- a/src/libide/symbols/ide-symbol.c
+++ b/src/libide/symbols/ide-symbol.c
@@ -386,7 +386,7 @@ ide_symbol_to_variant (const IdeSymbol *self)
g_variant_builder_add_parsed (&builder, "{%s,%v}", "canonical", v);
}
- return g_variant_ref_sink (g_variant_builder_end (&builder));
+ return g_variant_take_ref (g_variant_builder_end (&builder));
}
IdeSymbol *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]