summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2014-06-27 23:56:23 +0100
committerPhilip Withnall <philip.withnall@collabora.co.uk>2014-06-27 23:56:23 +0100
commitc9c21d7729b406f7da7b9ce894ec574f316fb247 (patch)
tree32ba0e03367df1b2b259b4d1cc833052608cbabd /tests
parent23d2c16a3a36afa329fc3d58b6e84a89ccd351be (diff)
gsignal: Assume GError types will be GError* in signals
…rather than GError**. If that were the case, multiple handlers for the signal would collide on setting the GError. There is no way it could work sensibly.
Diffstat (limited to 'tests')
-rw-r--r--tests/gsignal-connect.c13
-rw-r--r--tests/gsignal.head.c9
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/gsignal-connect.c b/tests/gsignal-connect.c
index 06e3782..5583740 100644
--- a/tests/gsignal-connect.c
+++ b/tests/gsignal-connect.c
@@ -344,3 +344,16 @@
g_signal_connect (proxy, "interface-added",
(GCallback) dbus_object_interface_added_cb, NULL);
}
+
+/*
+ * No error
+ */
+{
+ // GDBusConnection::closed has a GError* as one of its parameters,
+ // which we want to check to avoid bug 844/529.
+ GDBusConnection *conn = g_malloc (5); // only checking the type
+ GObject *self = g_malloc (5); // only checking the type
+ g_signal_connect_object (conn, "closed",
+ G_CALLBACK (dbus_connection_closed_cb),
+ self, 0);
+}
diff --git a/tests/gsignal.head.c b/tests/gsignal.head.c
index c6b70ef..266b1d1 100644
--- a/tests/gsignal.head.c
+++ b/tests/gsignal.head.c
@@ -134,6 +134,15 @@ dbus_object_proxy_interface_added_cb (GDBusObjectProxy *obj,
/* Done */
}
+static void
+dbus_connection_closed_cb (GDBusConnection *conn,
+ gboolean remote_peer_vanished,
+ GError *error,
+ gpointer user_data)
+{
+ /* Done */
+}
+
int
main (void)
{