diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2014-06-30 19:44:24 +0100 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2014-06-30 20:02:46 +0100 |
commit | 486b533c6982c4a4255f7a5f9a0571df2b6e6360 (patch) | |
tree | 8f487ad131c0d54db2a827e3ba6258f0240f8d9f /tests | |
parent | 0fbce04db4197f07c76ba8f6346b6f8b6f30f5e4 (diff) |
gsignal: Fix expected types for enums and flags in signals
Previously they were expected to be passed as pointers, which was not
correct. Now they are expected to be passed by value.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gsignal-connect.c | 11 | ||||
-rw-r--r-- | tests/gsignal.head.c | 10 |
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/gsignal-connect.c b/tests/gsignal-connect.c index afa3a00..9b5e6b5 100644 --- a/tests/gsignal-connect.c +++ b/tests/gsignal-connect.c @@ -383,3 +383,14 @@ g_signal_connect (obj, "interface_added", (GCallback) dbus_object_interface_added_cb, NULL); } + +/* + * No error + */ +{ + // Connecting to a signal which returns a flag variable. + GTlsConnection *conn = g_malloc (5); // only checking the type + g_signal_connect (conn, "accept-certificate", + (GCallback) tls_connection_accept_certificate_cb, + NULL); +} diff --git a/tests/gsignal.head.c b/tests/gsignal.head.c index 89606e6..c47a5db 100644 --- a/tests/gsignal.head.c +++ b/tests/gsignal.head.c @@ -150,6 +150,16 @@ dbus_connection_closed_cb (GDBusConnection *conn, /* Done */ } +static gboolean +tls_connection_accept_certificate_cb (GTlsConnection *conn, + GTlsCertificate *peer_certificate, + GTlsCertificateFlags errors, + gpointer user_data) +{ + /* Done */ + return FALSE; +} + int main (void) { |