[glib: 1/2] Run the accumulator function for RUN_CLEANUP object handlers too
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] Run the accumulator function for RUN_CLEANUP object handlers too
- Date: Mon, 26 Aug 2019 06:19:27 +0000 (UTC)
commit 153ac4c82a98d8b51b821d693ba8a570040acb57
Author: Sebastian Dröge <sebastian droege collabora co uk>
Date: Sun Aug 25 19:10:45 2019 +0200
Run the accumulator function for RUN_CLEANUP object handlers too
Closes issue #512
gobject/gsignal.c | 5 +++++
tests/gobject/testgobject.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gobject/gsignal.c b/gobject/gsignal.c
index 26fba477f..9f4342aea 100644
--- a/gobject/gsignal.c
+++ b/gobject/gsignal.c
@@ -3759,9 +3759,14 @@ signal_emit_unlocked_R (SignalNode *node,
node->n_params + 1,
instance_and_params,
&emission.ihint);
+ if (!accumulate (&emission.ihint, emission_return, &accu, accumulator) &&
+ emission.state == EMISSION_RUN)
+ emission.state = EMISSION_STOP;
if (need_unset)
g_value_unset (&accu);
SIGNAL_LOCK ();
+ return_value_altered = TRUE;
+
emission.chain_type = G_TYPE_NONE;
if (emission.state == EMISSION_RESTART)
diff --git a/tests/gobject/testgobject.c b/tests/gobject/testgobject.c
index 02cfc56f9..df7d4c748 100644
--- a/tests/gobject/testgobject.c
+++ b/tests/gobject/testgobject.c
@@ -416,7 +416,7 @@ main (int argc,
g_print ("MAIN: emit test-signal:\n");
g_signal_emit_by_name (dobject, "test-signal", sigarg, NULL, &string);
g_message ("signal return: \"%s\"", string);
- g_assert (strcmp (string, "<default_handler><default_handler>") == 0);
+ g_assert_cmpstr (string, ==, "<default_handler><default_handler><default_handler>");
g_free (string);
g_print ("MAIN: call iface print-string on test and derived object:\n");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]