diff options
-rw-r--r-- | vala/valastruct.vala | 9 | ||||
-rw-r--r-- | vapigen/valagidlparser.vala | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/vala/valastruct.vala b/vala/valastruct.vala index 49177f240..63b8b8542 100644 --- a/vala/valastruct.vala +++ b/vala/valastruct.vala @@ -403,6 +403,15 @@ public class Vala.Struct : TypeSymbol { return rank; } + /** + * Sets the rank of this integer or floating point type. + * + * @return the rank if this is an integer or floating point type + */ + public void set_rank (int rank) { + this.rank = rank; + } + private void process_ccode_attribute (Attribute a) { if (a.has_argument ("const_cname")) { set_const_cname (a.get_string ("const_cname")); diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala index 010c82ffb..246dd18f5 100644 --- a/vapigen/valagidlparser.vala +++ b/vapigen/valagidlparser.vala @@ -425,6 +425,10 @@ public class Vala.GIdlParser : CodeVisitor { if (eval (nv[1]) == "1") { return; } + } else if (nv[0] == "base_type") { + st.base_type = parse_type_string (eval (nv[1])); + } else if (nv[0] == "rank") { + st.set_rank (eval (nv[1]).to_int ()); } else if (nv[0] == "simple_type") { if (eval (nv[1]) == "1") { st.set_simple_type (true); |