[Spice-devel] [PATCH spice-gtk] gio-coroutine: Fix C inheritance

Frediano Ziglio fziglio at redhat.com
Fri Apr 13 14:22:59 UTC 2018


GConditionWaitSource should inherit from GSource so GSource
should be the first field.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 src/gio-coroutine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gio-coroutine.c b/src/gio-coroutine.c
index c866e15..1322f01 100644
--- a/src/gio-coroutine.c
+++ b/src/gio-coroutine.c
@@ -24,8 +24,8 @@
 
 typedef struct _GConditionWaitSource
 {
+    GSource parent; // this MUST be the first field
     GCoroutine *self;
-    GSource src;
     GConditionWaitFunc func;
     gpointer data;
 } GConditionWaitSource;
-- 
2.14.3



More information about the Spice-devel mailing list