[vala/0.34] codegen: Avoid early return on sync dbus methods returning an error
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.34] codegen: Avoid early return on sync dbus methods returning an error
- Date: Mon, 6 Mar 2017 14:43:33 +0000 (UTC)
commit 82fe37972c07f178fadb45806dc8009fd5e5b826
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Mar 6 13:17:40 2017 +0100
codegen: Avoid early return on sync dbus methods returning an error
If there are arguments that need freeing, we need to fall through the
_error label, if there is any.
https://bugzilla.gnome.org/show_bug.cgi?id=778540
codegen/valagdbusservermodule.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valagdbusservermodule.vala b/codegen/valagdbusservermodule.vala
index ff1b236..7052fde 100644
--- a/codegen/valagdbusservermodule.vala
+++ b/codegen/valagdbusservermodule.vala
@@ -240,7 +240,11 @@ public class Vala.GDBusServerModule : GDBusClientModule {
return_error.add_argument (new CCodeIdentifier ("error"));
ccode.add_expression (return_error);
- ccode.add_return ();
+ if (need_goto_label) {
+ ccode.add_goto ("_error");
+ } else {
+ ccode.add_return ();
+ }
ccode.close ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]