[gnome-builder] jsonrpc: pass additional ref to callback function
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] jsonrpc: pass additional ref to callback function
- Date: Mon, 20 Feb 2017 23:41:01 +0000 (UTC)
commit 0ddcb09ffd86ee44aab57cc9c4355a48dad78c7a
Author: Christian Hergert <chergert redhat com>
Date: Mon Feb 20 15:40:52 2017 -0800
jsonrpc: pass additional ref to callback function
This isn't necessary, but it looks less suspicious when reading over the
particular code.
contrib/jsonrpc-glib/jsonrpc-client.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/contrib/jsonrpc-glib/jsonrpc-client.c b/contrib/jsonrpc-glib/jsonrpc-client.c
index 9456c10..9f38a7b 100644
--- a/contrib/jsonrpc-glib/jsonrpc-client.c
+++ b/contrib/jsonrpc-glib/jsonrpc-client.c
@@ -741,7 +741,7 @@ jsonrpc_client_call_sync_cb (GObject *object,
gpointer user_data)
{
JsonrpcClient *self = (JsonrpcClient *)object;
- GTask *task = user_data;
+ g_autoptr(GTask) task = user_data;
g_autoptr(JsonNode) return_value = NULL;
g_autoptr(GError) error = NULL;
@@ -800,7 +800,7 @@ jsonrpc_client_call (JsonrpcClient *self,
params,
cancellable,
jsonrpc_client_call_sync_cb,
- task);
+ g_object_ref (task));
while (!g_task_get_completed (task))
g_main_context_iteration (main_context, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]