Commit 08e77adc authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

never write typedefs for static or declaration-only classes and

2007-10-27  Juerg Billeter  <j@bitron.ch>

	* gobject/valaccodegeneratorsourcefile.vala: never write typedefs for
	  static or declaration-only classes and interfaces, fixes bug 479106

svn path=/trunk/; revision=668
parent 617b26b6
2007-10-27 Jürg Billeter <j@bitron.ch>
* gobject/valaccodegeneratorsourcefile.vala: never write typedefs for
static or declaration-only classes and interfaces, fixes bug 479106
2007-10-27 Jürg Billeter <j@bitron.ch> 2007-10-27 Jürg Billeter <j@bitron.ch>
* vala/valasemanticanalyzer.vala: display line number when reporting * vala/valasemanticanalyzer.vala: display line number when reporting
......
...@@ -202,12 +202,16 @@ public class Vala.CCodeGenerator { ...@@ -202,12 +202,16 @@ public class Vala.CCodeGenerator {
header_type_declaration.append (new CCodeTypeDefinition ("struct _%s".printf (st.get_cname ()), new CCodeVariableDeclarator (st.get_cname ()))); header_type_declaration.append (new CCodeTypeDefinition ("struct _%s".printf (st.get_cname ()), new CCodeVariableDeclarator (st.get_cname ())));
} else if (node is Class) { } else if (node is Class) {
var cl = (Class) node; var cl = (Class) node;
header_type_declaration.append (new CCodeTypeDefinition ("struct _%s".printf (cl.get_cname ()), new CCodeVariableDeclarator (cl.get_cname ()))); if (!cl.is_static) {
header_type_declaration.append (new CCodeTypeDefinition ("struct _%sClass".printf (cl.get_cname ()), new CCodeVariableDeclarator ("%sClass".printf (cl.get_cname ())))); header_type_declaration.append (new CCodeTypeDefinition ("struct _%s".printf (cl.get_cname ()), new CCodeVariableDeclarator (cl.get_cname ())));
header_type_declaration.append (new CCodeTypeDefinition ("struct _%sClass".printf (cl.get_cname ()), new CCodeVariableDeclarator ("%sClass".printf (cl.get_cname ()))));
}
} else if (node is Interface) { } else if (node is Interface) {
var iface = (Interface) node; var iface = (Interface) node;
header_type_declaration.append (new CCodeTypeDefinition ("struct _%s".printf (iface.get_cname ()), new CCodeVariableDeclarator (iface.get_cname ()))); if (!iface.is_static && !iface.declaration_only) {
header_type_declaration.append (new CCodeTypeDefinition ("struct _%s".printf (iface.get_type_cname ()), new CCodeVariableDeclarator (iface.get_type_cname ()))); header_type_declaration.append (new CCodeTypeDefinition ("struct _%s".printf (iface.get_cname ()), new CCodeVariableDeclarator (iface.get_cname ())));
header_type_declaration.append (new CCodeTypeDefinition ("struct _%s".printf (iface.get_type_cname ()), new CCodeVariableDeclarator (iface.get_type_cname ())));
}
} }
} }
} }
......
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