[vala] Fix nullable struct properties
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] Fix nullable struct properties
- Date: Tue, 22 Sep 2009 20:59:02 +0000 (UTC)
commit 0920805aa49de47216f1d1f5d4b2ff9c92df5d61
Author: Jürg Billeter <j bitron ch>
Date: Tue Sep 22 22:58:10 2009 +0200
Fix nullable struct properties
Fixes bug 595587.
codegen/valaccodememberaccessmodule.vala | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodememberaccessmodule.vala b/codegen/valaccodememberaccessmodule.vala
index 70e3cc9..cd537bc 100644
--- a/codegen/valaccodememberaccessmodule.vala
+++ b/codegen/valaccodememberaccessmodule.vala
@@ -385,7 +385,8 @@ internal class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
if (current_property_accessor != null &&
current_property_accessor.writable &&
current_property_accessor.value_parameter == p &&
- current_property_accessor.prop.property_type.is_real_struct_type ()) {
+ current_property_accessor.prop.property_type.is_real_struct_type () &&
+ !current_property_accessor.prop.property_type.nullable) {
expr.ccodenode = new CCodeIdentifier ("(*value)");
} else {
expr.ccodenode = get_variable_cexpression (p.name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]