From 4c328d0fca2ca617341e338b4c3ca8a2d1c56509 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Tue, 28 Sep 2021 19:55:26 +0200 Subject: Fix g_source_new wrapped function and friends (helps Zoom) --- src/wrapped/wrappedglib2.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/wrapped/wrappedglib2.c b/src/wrapped/wrappedglib2.c index 5a332a7c..7c7a53f9 100755 --- a/src/wrapped/wrappedglib2.c +++ b/src/wrapped/wrappedglib2.c @@ -214,6 +214,8 @@ typedef struct my_GSourceFuncs_s { int (*check) (void* source); int (*dispatch) (void* source, GSourceFunc callback,void* user_data); void (*finalize) (void* source); + GSourceFunc closure; + void* marshal; } my_GSourceFuncs_t; #define SUPER() \ @@ -301,17 +303,17 @@ SUPER() #undef GO // then the static functions callback that may be used with the structure, but dispatch also have a callback... #define GO(A) \ -static uintptr_t fct_funcs_prepare_##A = 0; \ -static int my_funcs_prepare_##A(void* source, int timeout_) { \ +static uintptr_t fct_funcs_prepare_##A = 0; \ +static int my_funcs_prepare_##A(void* source, int *timeout_) { \ return (int)RunFunction(my_context, fct_funcs_prepare_##A, 2, source, timeout_); \ } \ -static uintptr_t fct_funcs_check_##A = 0; \ -static int my_funcs_check_##A(void* source) { \ +static uintptr_t fct_funcs_check_##A = 0; \ +static int my_funcs_check_##A(void* source) { \ return (int)RunFunction(my_context, fct_funcs_check_##A, 1, source); \ } \ -static uintptr_t fct_funcs_dispatch_cb_##A = 0; \ -static int my_funcs_dispatch_cb_##A(void* a, void* b, void* c, void* d) { \ - return (int)RunFunction(my_context, fct_funcs_dispatch_cb_##A, 4, a, b, c, d); \ +static uintptr_t fct_funcs_dispatch_cb_##A = 0; \ +static int my_funcs_dispatch_cb_##A(void* a, void* b, void* c, void* d) { \ + return (int)RunFunction(my_context, fct_funcs_dispatch_cb_##A, 4, a, b, c, d); \ } \ static uintptr_t fct_funcs_dispatch_##A = 0; \ static int my_funcs_dispatch_##A(void* source, void* cb, void* data) { \ -- cgit 1.4.1