[vala] GAsync: Struct return value fix
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] GAsync: Struct return value fix
- Date: Wed, 23 Dec 2009 21:33:58 +0000 (UTC)
commit ab901453fa9e86bc64e11fd394fc687ae23f43b1
Author: Jürg Billeter <j bitron ch>
Date: Wed Dec 23 22:25:45 2009 +0100
GAsync: Struct return value fix
codegen/valagasyncmodule.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valagasyncmodule.vala b/codegen/valagasyncmodule.vala
index 3d6f9fe..9bd6cb7 100644
--- a/codegen/valagasyncmodule.vala
+++ b/codegen/valagasyncmodule.vala
@@ -368,7 +368,7 @@ internal class Vala.GAsyncModule : GSignalModule {
propagate_error.add_argument (simple_async_result_cast);
propagate_error.add_argument (new CCodeIdentifier ("error"));
var errorblock = new CCodeBlock ();
- if (return_type is VoidType) {
+ if (return_type is VoidType || return_type.is_real_non_null_struct_type ()) {
errorblock.add_statement (new CCodeReturnStatement ());
} else {
errorblock.add_statement (new CCodeReturnStatement (default_value_for_type (return_type, false)));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]