mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Do not mix declarations and statements
Projects using glib-genmarshal may still wish to support C89.
This commit is contained in:
parent
9c66e65b29
commit
ea365530d2
@ -650,7 +650,6 @@ def generate_body(retval, params, prefix, va_marshal=False):
|
||||
|
||||
if retval_setter:
|
||||
body += [' {} v_return;'.format(OUT_ARGS[retval]['ctype'])]
|
||||
body += [' g_return_if_fail (return_value != NULL);']
|
||||
|
||||
if va_marshal:
|
||||
for idx, arg in enumerate(get_args):
|
||||
@ -680,7 +679,14 @@ def generate_body(retval, params, prefix, va_marshal=False):
|
||||
body += [BOX_UNTYPED_STR.format(idx=idx, box_func=box_func)]
|
||||
|
||||
body += [' va_end (args_copy);']
|
||||
else:
|
||||
|
||||
body += ['']
|
||||
|
||||
# Preconditions check
|
||||
if retval_setter:
|
||||
body += [' g_return_if_fail (return_value != NULL);']
|
||||
|
||||
if not va_marshal:
|
||||
body += [' g_return_if_fail (n_param_values == {:d});'.format(len(get_args) + 1)]
|
||||
|
||||
body += ['']
|
||||
|
Loading…
Reference in New Issue
Block a user