2007-03-21 Jürg Billeter <j@bitron.ch>
+ * vala/valastruct.vala: use pointer as default of type_id and
+ marshaller_type_name for reference types
+ * vala/valapointer.vala: implement get_type_id
+
+2007-03-21 Jürg Billeter <j@bitron.ch>
+
* vala/valacodegenerator.vala: deep copy GLists if necessary, patch by
Mathias Hasselmann
* vapi/glib-2.0.vala: fix some printf format strings to work on ILP32
public override ref List<string> get_cheader_filenames () {
return referent_type.get_cheader_filenames ();
}
-
+
+ public override string get_type_id () {
+ return "G_TYPE_POINTER";
+ }
+
public override string get_marshaller_type_name () {
return "POINTER";
}
/* valastruct.vala
*
- * Copyright (C) 2006 Jürg Billeter
+ * Copyright (C) 2006-2007 Jürg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
public override string get_type_id () {
if (type_id == null) {
- Report.error (source_reference, "The type `%s` doesn't declare a type id".printf (symbol.get_full_name ()));
+ if (is_reference_type ()) {
+ type_id = "G_TYPE_POINTER";
+ } else {
+ Report.error (source_reference, "The type `%s` doesn't declare a type id".printf (symbol.get_full_name ()));
+ }
}
return type_id;
}
public override string get_marshaller_type_name () {
if (marshaller_type_name == null) {
- Report.error (source_reference, "The type `%s` doesn't declare a marshaller type name".printf (symbol.get_full_name ()));
+ if (is_reference_type ()) {
+ marshaller_type_name = "POINTER";
+ } else {
+ Report.error (source_reference, "The type `%s` doesn't declare a marshaller type name".printf (symbol.get_full_name ()));
+ }
}
return marshaller_type_name;
}