GSignal: Only limited usage of accumulator function possible
@sdroege
Submitted by Sebastian Dröge Link to original bug (#670193)
Description
The return_accu argument of the accumulator function is used to store the accumulated return value and is used to pass the accumulated return value of previous signal handlers to the accumulator function. It is initialized with g_value_init() before the first call to the accumulator function.
As there's no way to detect in the accumulator function if this is the first call to it, this limits the usage of the accumulator function. For example if your accumulator function wants to create the conjunction (&&) of all signal return values this is simply impossible because for the first call the return_accu will be FALSE and there's no way how the first call can be handled differently currently.
I would propose to add a new GSignalFlag that is set in the GSignalInvocationHint::run_type for the first call to the accumulator function only.
Version: 2.25.x