[vala] girparser: Don't mark out parameters as nullable
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] girparser: Don't mark out parameters as nullable
- Date: Tue, 19 Apr 2011 21:46:06 +0000 (UTC)
commit 1408116481da4c89313e2138a85980f3e22505e9
Author: Luca Bruno <lucabru src gnome org>
Date: Tue Apr 19 23:33:13 2011 +0200
girparser: Don't mark out parameters as nullable
The allow_none in the GIR format is referred to the storage location.
vala/valagirparser.vala | 2 +-
vapi/json-glib-1.0.vapi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 2d0638b..fadc59a 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -1780,7 +1780,7 @@ public class Vala.GirParser : CodeVisitor {
if (transfer == "full" || transfer == "container" || destroy != null) {
type.value_owned = true;
}
- if (allow_none == "1") {
+ if (allow_none == "1" && direction != "out") {
type.nullable = true;
}
diff --git a/vapi/json-glib-1.0.vapi b/vapi/json-glib-1.0.vapi
index 9fe5e00..76295ff 100644
--- a/vapi/json-glib-1.0.vapi
+++ b/vapi/json-glib-1.0.vapi
@@ -142,7 +142,7 @@ namespace Json {
public uint get_current_line ();
public uint get_current_pos ();
public unowned Json.Node get_root ();
- public bool has_assignment (out unowned string? variable_name);
+ public bool has_assignment (out unowned string variable_name);
public bool load_from_data (string data, ssize_t length = -1) throws GLib.Error;
public bool load_from_file (string filename) throws GLib.Error;
public bool load_from_stream (GLib.InputStream stream, GLib.Cancellable? cancellable = null) throws GLib.Error;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]