Use a generic marshaller if one is not specified

Since g_cclosure_marshal_generic is always enabled, it makes
sense to always use that instead of using generated ones.

https://bugzilla.gnome.org/show_bug.cgi?id=654917
This commit is contained in:
Johan Dahlin 2011-07-12 13:39:45 -03:00 committed by Johan Dahlin
parent fe6dad271b
commit fa2861e3b6

View File

@ -1288,8 +1288,8 @@ g_signal_query (guint signal_id,
* not associate a class method slot with this signal.
* @accumulator: the accumulator for this signal; may be %NULL.
* @accu_data: user data for the @accumulator.
* @c_marshaller: the function to translate arrays of parameter values to
* signal emissions into C language callback invocations.
* @c_marshaller: (allow-none): the function to translate arrays of parameter
* values to signal emissions into C language callback invocations or %NULL.
* @return_type: the type of return value, or #G_TYPE_NONE for a signal
* without a return value.
* @n_params: the number of parameter types to follow.
@ -1310,6 +1310,9 @@ g_signal_query (guint signal_id,
* <code>super_class->signal_handler = my_signal_handler</code>. Instead they
* will have to use g_signal_override_class_handler().
*
* If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as
* the marshaller for this signal.
*
* Returns: the signal id
*/
guint
@ -1367,8 +1370,8 @@ g_signal_new (const gchar *signal_name,
* not associate a class method with this signal.
* @accumulator: the accumulator for this signal; may be %NULL.
* @accu_data: user data for the @accumulator.
* @c_marshaller: the function to translate arrays of parameter values to
* signal emissions into C language callback invocations.
* @c_marshaller: (allow-none): the function to translate arrays of parameter
* values to signal emissions into C language callback invocations or %NULL.
* @return_type: the type of return value, or #G_TYPE_NONE for a signal
* without a return value.
* @n_params: the number of parameter types to follow.
@ -1388,6 +1391,9 @@ g_signal_new (const gchar *signal_name,
*
* See g_signal_new() for information about signal names.
*
* If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as
* the marshaller for this signal.
*
* Returns: the signal id
*
* Since: 2.18
@ -1496,8 +1502,9 @@ signal_add_class_closure (SignalNode *node,
* @class_closure: The closure to invoke on signal emission; may be %NULL
* @accumulator: the accumulator for this signal; may be %NULL
* @accu_data: user data for the @accumulator
* @c_marshaller: the function to translate arrays of parameter values to
* signal emissions into C language callback invocations
* @c_marshaller: (allow-none): the function to translate arrays of
* parameter values to signal emissions into C language callback
* invocations or %NULL
* @return_type: the type of return value, or #G_TYPE_NONE for a signal
* without a return value
* @n_params: the length of @param_types
@ -1507,6 +1514,9 @@ signal_add_class_closure (SignalNode *node,
*
* See g_signal_new() for details on allowed signal names.
*
* If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as
* the marshaller for this signal.
*
* Returns: the signal id
*/
guint
@ -1629,6 +1639,8 @@ g_signal_newv (const gchar *signal_name,
}
else
node->accumulator = NULL;
if (c_marshaller == NULL)
c_marshaller = g_cclosure_marshal_generic;
node->c_marshaller = c_marshaller;
node->emission_hooks = NULL;
if (class_closure)
@ -1658,8 +1670,8 @@ g_signal_newv (const gchar *signal_name,
* @class_closure: The closure to invoke on signal emission; may be %NULL.
* @accumulator: the accumulator for this signal; may be %NULL.
* @accu_data: user data for the @accumulator.
* @c_marshaller: the function to translate arrays of parameter values to
* signal emissions into C language callback invocations.
* @c_marshaller: (allow-none): the function to translate arrays of parameter
* values to signal emissions into C language callback invocations or %NULL.
* @return_type: the type of return value, or #G_TYPE_NONE for a signal
* without a return value.
* @n_params: the number of parameter types in @args.
@ -1669,6 +1681,9 @@ g_signal_newv (const gchar *signal_name,
*
* See g_signal_new() for details on allowed signal names.
*
* If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as
* the marshaller for this signal.
*
* Returns: the signal id
*/
guint