diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-12-10 16:07:46 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-12-11 14:18:35 +0100 |
commit | 013bb64cc8ef97326db1a44affcf420b0bc941cf (patch) | |
tree | 60e565a6e69db8eb692fd87d0d4a1a8bf0ca2607 /codegen/valaccode.vala | |
parent | 3763b4c6c296fa3bc467050ae50e1dc320e85039 (diff) | |
download | vala-013bb64cc8ef97326db1a44affcf420b0bc941cf.tar.gz |
codegen: Handle non-default AsyncResult parameter position
Unfortunately gdbus-codegen puts the AsyncResult parameter after possible
out-parameters therefore there is an "async_result_pos" attribute required
to handle this correctly.
Vala supposely follows the common practice to put the AsyncResult before
out-parameters by default.
Fixes https://gitlab.gnome.org/GNOME/vala/issues/709
Diffstat (limited to 'codegen/valaccode.vala')
-rw-r--r-- | codegen/valaccode.vala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/codegen/valaccode.vala b/codegen/valaccode.vala index d4d9abee5..2954b3e37 100644 --- a/codegen/valaccode.vala +++ b/codegen/valaccode.vala @@ -380,6 +380,11 @@ namespace Vala { return get_ccode_attribute(m).vfunc_name; } + public static double get_ccode_async_result_pos (Method m) { + assert (m.coroutine); + return m.get_attribute_double ("CCode", "async_result_pos", 0.1); + } + public static string get_ccode_finish_name (Method m) { return get_ccode_attribute(m).finish_name; } |