Commit 9204c84c authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

add missing parent field for derived non-GObject classes

2007-09-21  Juerg Billeter  <j@bitron.ch>

	* gobject/valaccodegeneratorclass.vala: add missing parent field for
	  derived non-GObject classes

svn path=/trunk/; revision=626
parent fb9c60d0
2007-09-21 Jürg Billeter <j@bitron.ch>
* gobject/valaccodegeneratorclass.vala: add missing parent field for
derived non-GObject classes
2007-09-20 Raffaele Sandrini <raffaele@sandrini.ch>
* vala/valasemanticanalyzer.vala, gobject/valaccodegenerator.vala:
......
......@@ -95,13 +95,16 @@ public class Vala.CCodeGenerator {
decl_frag.append (new CCodeTypeDefinition ("struct %s".printf (instance_struct.name), new CCodeVariableDeclarator (cl.get_cname ())));
}
if (cl.base_class != null) {
instance_struct.add_field (cl.base_class.get_cname (), "parent");
}
if (is_gobject) {
if (cl.source_reference.file.cycle == null) {
decl_frag.append (new CCodeTypeDefinition ("struct %s".printf (type_struct.name), new CCodeVariableDeclarator ("%sClass".printf (cl.get_cname ()))));
}
decl_frag.append (new CCodeTypeDefinition ("struct %s".printf (instance_priv_struct.name), new CCodeVariableDeclarator ("%sPrivate".printf (cl.get_cname ()))));
instance_struct.add_field (cl.base_class.get_cname (), "parent");
instance_struct.add_field ("%sPrivate *".printf (cl.get_cname ()), "priv");
type_struct.add_field ("%sClass".printf (cl.base_class.get_cname ()), "parent");
}
......
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