vala r1509 - in trunk: . vala vapigen
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1509 - in trunk: . vala vapigen
- Date: Sat, 31 May 2008 08:22:38 +0000 (UTC)
Author: juergbi
Date: Sat May 31 08:22:38 2008
New Revision: 1509
URL: http://svn.gnome.org/viewvc/vala?rev=1509&view=rev
Log:
2008-05-31 JÃrg Billeter <j bitron ch>
* vala/valainterfacewriter.vala:
* vapigen/valagidlparser.vala:
Support nullable return types
Modified:
trunk/ChangeLog
trunk/vala/valainterfacewriter.vala
trunk/vapigen/valagidlparser.vala
Modified: trunk/vala/valainterfacewriter.vala
==============================================================================
--- trunk/vala/valainterfacewriter.vala (original)
+++ trunk/vala/valainterfacewriter.vala Sat May 31 08:22:38 2008
@@ -913,7 +913,7 @@
} else if (type is ValueType) {
if (type.nullable) {
// nullable structs are heap allocated
- return false;
+ return true;
}
// TODO return true for structs with destroy
Modified: trunk/vapigen/valagidlparser.vala
==============================================================================
--- trunk/vapigen/valagidlparser.vala (original)
+++ trunk/vapigen/valagidlparser.vala Sat May 31 08:22:38 2008
@@ -1284,6 +1284,10 @@
if (eval (nv[1]) == "1") {
return_type.value_owned = true;
}
+ } else if (nv[0] == "nullable") {
+ if (eval (nv[1]) == "1") {
+ return_type.nullable = true;
+ }
} else if (nv[0] == "sentinel") {
m.sentinel = eval (nv[1]);
} else if (nv[0] == "is_array") {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]