File: replace-deprecated-functions.patch

package info (click to toggle)
dbus-test-runner 19.04.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,316 kB
  • sloc: sh: 4,268; ansic: 3,632; makefile: 520; xml: 151
file content (30 lines) | stat: -rw-r--r-- 1,197 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Description: tests: Replace deprecated g_main_{pending,iteration} with current g_main_context_{pending,iteration}
Author: Iain Lane <laney@debian.org>
Origin: https://bazaar.launchpad.net/~indicator-applet-developers/dbus-test-runner/trunk.16.10/revision/109

Index: dbus-test-runner/tests/test-libdbustest-mock.c
===================================================================
--- dbus-test-runner.orig/tests/test-libdbustest-mock.c
+++ dbus-test-runner/tests/test-libdbustest-mock.c
@@ -389,8 +389,8 @@ test_signals (void)
 	g_assert(dbus_test_dbus_mock_object_emit_signal(mock, obj, "testsig", NULL, NULL, NULL));
 
 	g_usleep(100000);
-	while (g_main_pending())
-		g_main_iteration(TRUE);
+	while (g_main_context_pending(NULL))
+		g_main_context_iteration(NULL, TRUE);
 
 	g_assert(signal_count == 1);
 
@@ -410,8 +410,8 @@ test_signals (void)
 	g_assert(dbus_test_dbus_mock_object_emit_signal(mock, obj, "testsig_abc", G_VARIANT_TYPE("(sss)"), g_variant_new_parsed("('a', 'b', 'c')"), NULL));
 
 	g_usleep(100000);
-	while (g_main_pending())
-		g_main_iteration(TRUE);
+	while (g_main_context_pending(NULL))
+		g_main_context_iteration(NULL, TRUE);
 
 	g_assert(signal_abc_count == 1);