G_TYPE_BOOLEAN signal argument always translated into False, regardless of actual value
I am seeing the behavior described in the title with a signal that has been created as:
signals[FINISHED_EVENT] = g_signal_new(
"finished-event",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST,
0, // no default handler
NULL,
NULL,
xmi_VOID__BOOLEAN_STRING,
G_TYPE_NONE,
2,
G_TYPE_BOOLEAN, // gboolean -> result
G_TYPE_STRING // gchar* -> buffer
);
Now when I emit this signal (from C, not Python), the signal callback in Python always receives False
, regardless of what was provided to g_signal_emit...
def _test_succeed_finished_cb(self, job, result, buffer):
self.main_loop.quit()
self.assertTrue(result)
print("message: {}".format(buffer))
The buffer
string is passed through without problems.
I have tried this on both macOS (3.30.2) and Linux (3.22.0), and I get the same incorrect behaviour.