~ubuntu-branches/ubuntu/vivid/vala/vivid

« back to all changes in this revision

Viewing changes to vala/valagirparser.vala

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-07-28 07:58:01 UTC
  • mfrom: (1.5.5 upstream) (7.3.14 experimental)
  • Revision ID: james.westby@ubuntu.com-20100728075801-18u9cg5hv5oety6m
Tags: 0.9.4-1
New upstream development release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
 
107
107
        void next () {
108
108
                current_token = reader.read_token (out begin, out end);
 
109
 
 
110
                // Skip *all* <doc> tags
 
111
                if (current_token == MarkupTokenType.START_ELEMENT && reader.name == "doc")
 
112
                        skip_element();
109
113
        }
110
114
 
111
115
        void start_element (string name) {
372
376
 
373
377
        EnumValue parse_enumeration_member () {
374
378
                start_element ("member");
375
 
                var ev = new EnumValue (string.joinv ("_", reader.get_attribute ("name").up ().split ("-")));
 
379
                var ev = new EnumValue (string.joinv ("_", reader.get_attribute ("name").up ().split ("-")), null);
376
380
                ev.set_cname (reader.get_attribute ("c:identifier"));
377
381
                next ();
378
382
                end_element ("member");
517
521
                                type_name = "bool";
518
522
                        } else if (type_name == "GLib.offset") {
519
523
                                type_name = "int64";
 
524
                        } else if (type_name == "gsize") {
 
525
                                type_name = "size_t";
520
526
                        } else if (type_name == "GType") {
521
527
                                type_name = "GLib.Type";
522
528
                        } else if (type_name == "GLib.String") {
795
801
                        }
796
802
                }
797
803
 
 
804
                // ensure we have at least one instantiable prerequisite (GLib.Object)
 
805
                bool has_instantiable_prereq = false;
 
806
                foreach (DataType prereq in iface.get_prerequisites ()) {
 
807
                        if (prereq.data_type is Class) {
 
808
                                has_instantiable_prereq = true;
 
809
                                break;
 
810
                        }
 
811
                }
 
812
 
 
813
                if (!has_instantiable_prereq)
 
814
                        iface.add_prerequisite (new ObjectType ((ObjectTypeSymbol) glib_ns.scope.lookup ("Object")));
 
815
 
798
816
                // virtual method merging
799
817
                foreach (Method m in vmethods) {
800
818
                        var symbol = iface.scope.lookup (m.name);
1106
1124
                                        }
1107
1125
                                        info.param.carray_length_parameter_position = parameters[info.array_length_idx-add].vala_idx;
1108
1126
                                }
1109
 
                                if (info.param.parameter_type is ArrayType && info.array_length_idx == -1) {
 
1127
                                if (info.param.variable_type is ArrayType && info.array_length_idx == -1) {
1110
1128
                                        info.param.no_array_length = true;
1111
1129
                                }
1112
1130