[gnome-builder] lsp: free formatted gvariant string
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] lsp: free formatted gvariant string
- Date: Thu, 19 Aug 2021 22:07:42 +0000 (UTC)
commit 6bc0f4d7b191a7353fa99eaea89b30c96aedcb28
Author: Christian Hergert <chergert redhat com>
Date: Thu Aug 19 14:39:05 2021 -0700
lsp: free formatted gvariant string
and make it only on debug builds.
src/libide/lsp/ide-lsp-completion-item.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/libide/lsp/ide-lsp-completion-item.c b/src/libide/lsp/ide-lsp-completion-item.c
index 271ca9579..63a07abe4 100644
--- a/src/libide/lsp/ide-lsp-completion-item.c
+++ b/src/libide/lsp/ide-lsp-completion-item.c
@@ -215,13 +215,14 @@ ide_lsp_completion_item_get_additional_text_edits(IdeLspCompletionItem *self,
IdeTextEdit *edit = ide_lsp_decode_text_edit (text_edit, file);
if (edit != NULL)
- {
- g_ptr_array_add (result, edit);
- }
+ g_ptr_array_add (result, edit);
+#ifdef IDE_ENABLE_TRACE
else
{
- g_warning ("Additional text edit could not be parsed: %s", g_variant_print (text_edit, TRUE));
+ g_autofree char *msg = g_variant_print (text_edit, TRUE);
+ IDE_TRACE_MSG ("Additional text edit could not be parsed: %s", msg);
}
+#endif
}
return g_steal_pointer (&result);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]