Commit 2e190d3f authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

use pointer as default of type_id and marshaller_type_name for reference

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

svn path=/trunk/; revision=253
parent 944081e0
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
......
......@@ -71,7 +71,11 @@ public class Vala.Pointer : DataType {
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
......@@ -331,7 +331,11 @@ public class Vala.Struct : DataType {
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;
}
......@@ -342,7 +346,11 @@ public class Vala.Struct : DataType {
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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment