mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-04 08:23:38 +02:00
gsourceclosure: use g_cclosure_marshal_generic
For the glib-defined source types, and any source type that defines a closure callback but not a closure marshal, use g_cclosure_marshal_generic. And then remove all the other remaining source closure marshals. https://bugzilla.gnome.org/show_bug.cgi?id=701511
This commit is contained in:
@@ -109,37 +109,12 @@ fd_source_closure_callback (int fd,
|
||||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
fd_source_closure_marshal (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data)
|
||||
{
|
||||
GFDSourceFunc callback;
|
||||
GCClosure *cc = (GCClosure*) closure;
|
||||
gboolean v_return;
|
||||
|
||||
g_return_if_fail (return_value != NULL);
|
||||
g_return_if_fail (n_param_values == 0);
|
||||
|
||||
callback = (GFDSourceFunc) (marshal_data ? marshal_data : cc->callback);
|
||||
|
||||
v_return = callback (g_value_get_int (param_values),
|
||||
g_value_get_flags (param_values + 1),
|
||||
closure->data);
|
||||
|
||||
g_value_set_boolean (return_value, v_return);
|
||||
}
|
||||
|
||||
static GSourceFuncs fd_source_funcs = {
|
||||
fd_source_prepare,
|
||||
fd_source_check,
|
||||
fd_source_dispatch,
|
||||
fd_source_finalize,
|
||||
(GSourceFunc)fd_source_closure_callback,
|
||||
(GSourceDummyMarshal)fd_source_closure_marshal,
|
||||
};
|
||||
|
||||
GSource *
|
||||
|
Reference in New Issue
Block a user