[gnome-builder] task: steal result for propagating pointers
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] task: steal result for propagating pointers
- Date: Tue, 27 Mar 2018 08:26:21 +0000 (UTC)
commit 275225b48e43ddb2c83f735144ef8c92958dfd69
Author: Christian Hergert <chergert redhat com>
Date: Tue Mar 27 01:25:07 2018 -0700
task: steal result for propagating pointers
These can't be copied, so to have the behavior we're trying to emulate
from GTask, we should steal the result as we can't copy them anyway.
src/libide/threading/ide-task.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/src/libide/threading/ide-task.c b/src/libide/threading/ide-task.c
index df7483761..aee1155bf 100644
--- a/src/libide/threading/ide-task.c
+++ b/src/libide/threading/ide-task.c
@@ -1474,6 +1474,8 @@ ide_task_propagate_locked (IdeTask *self,
if (priv->release_on_propagate)
ret = g_steal_pointer (&priv->result);
+ else if (priv->result->type == IDE_TASK_RESULT_POINTER)
+ ret = g_steal_pointer (&priv->result);
else
ret = ide_task_result_copy (priv->result);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]