[Vala] [PATCH 1/2] Add support for additional gobject-instrospection base types



This adds mappings for two additional base types used by GObject
Introspection:

  * "filename", which is mapped to Vala's "string"
  * "gssize", which is mapped to Vala's "ssize_t"
---
 vala/valagirparser.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 4726858..c47b36b 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -517,12 +517,16 @@ public class Vala.GirParser : CodeVisitor {
                } else {
                        if (type_name == "utf8") {
                                type_name = "string";
+                       } else if (type_name == "filename") {
+                               type_name = "string";
                        } else if (type_name == "boolean") {
                                type_name = "bool";
                        } else if (type_name == "GLib.offset") {
                                type_name = "int64";
                        } else if (type_name == "gsize") {
                                type_name = "size_t";
+                       } else if (type_name == "gssize") {
+                               type_name = "ssize_t";
                        } else if (type_name == "GType") {
                                type_name = "GLib.Type";
                        } else if (type_name == "GLib.String") {
-- 
1.7.2




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]