vala r1166 - in trunk: . gobject
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1166 - in trunk: . gobject
- Date: Sun, 6 Apr 2008 19:33:46 +0100 (BST)
Author: juergbi
Date: Sun Apr 6 19:33:46 2008
New Revision: 1166
URL: http://svn.gnome.org/viewvc/vala?rev=1166&view=rev
Log:
2008-04-06 Juerg Billeter <j bitron ch>
* gobject/valaccodegenerator.vala,
gobject/valaccodegeneratorclass.vala,
gobject/valaccodegeneratorinterface.vala,
gobject/valaccodegeneratorsourcefile.vala,
gobject/valaccodegeneratorstruct.vala:
Add source_type_declaration and source_type_definition code
fragments to fix declaration order in generated C source files
Modified:
trunk/ChangeLog
trunk/gobject/valaccodegenerator.vala
trunk/gobject/valaccodegeneratorclass.vala
trunk/gobject/valaccodegeneratorinterface.vala
trunk/gobject/valaccodegeneratorsourcefile.vala
trunk/gobject/valaccodegeneratorstruct.vala
Modified: trunk/gobject/valaccodegenerator.vala
==============================================================================
--- trunk/gobject/valaccodegenerator.vala (original)
+++ trunk/gobject/valaccodegenerator.vala Sun Apr 6 19:33:46 2008
@@ -46,6 +46,8 @@
CCodeFragment header_constant_declaration;
CCodeFragment source_begin;
CCodeFragment source_include_directives;
+ CCodeFragment source_type_declaration;
+ CCodeFragment source_type_definition;
public CCodeFragment source_type_member_declaration;
CCodeFragment source_constant_declaration;
CCodeFragment source_signal_marshaller_declaration;
@@ -282,8 +284,8 @@
decl_frag = header_type_declaration;
def_frag = header_type_definition;
} else {
- decl_frag = source_type_member_declaration;
- def_frag = source_type_member_declaration;
+ decl_frag = source_type_declaration;
+ def_frag = source_type_definition;
}
def_frag.append (cenum);
@@ -436,7 +438,7 @@
if (!d.is_internal_symbol ()) {
header_type_declaration.append (ctypedef);
} else {
- source_type_member_declaration.append (ctypedef);
+ source_type_declaration.append (ctypedef);
}
}
Modified: trunk/gobject/valaccodegeneratorclass.vala
==============================================================================
--- trunk/gobject/valaccodegeneratorclass.vala (original)
+++ trunk/gobject/valaccodegeneratorclass.vala Sun Apr 6 19:33:46 2008
@@ -66,8 +66,8 @@
decl_frag = header_type_declaration;
def_frag = header_type_definition;
} else {
- decl_frag = source_type_member_declaration;
- def_frag = source_type_member_declaration;
+ decl_frag = source_type_declaration;
+ def_frag = source_type_definition;
}
if (is_gtypeinstance) {
Modified: trunk/gobject/valaccodegeneratorinterface.vala
==============================================================================
--- trunk/gobject/valaccodegeneratorinterface.vala (original)
+++ trunk/gobject/valaccodegeneratorinterface.vala Sun Apr 6 19:33:46 2008
@@ -40,8 +40,8 @@
decl_frag = header_type_declaration;
def_frag = header_type_definition;
} else {
- decl_frag = source_type_member_declaration;
- def_frag = source_type_member_declaration;
+ decl_frag = source_type_declaration;
+ def_frag = source_type_definition;
}
if (!iface.is_static && !iface.declaration_only) {
Modified: trunk/gobject/valaccodegeneratorsourcefile.vala
==============================================================================
--- trunk/gobject/valaccodegeneratorsourcefile.vala (original)
+++ trunk/gobject/valaccodegeneratorsourcefile.vala Sun Apr 6 19:33:46 2008
@@ -180,6 +180,8 @@
header_constant_declaration = new CCodeFragment ();
source_begin = new CCodeFragment ();
source_include_directives = new CCodeFragment ();
+ source_type_declaration = new CCodeFragment ();
+ source_type_definition = new CCodeFragment ();
source_type_member_declaration = new CCodeFragment ();
source_constant_declaration = new CCodeFragment ();
source_type_member_definition = new CCodeFragment ();
@@ -324,6 +326,10 @@
writer.write_newline ();
source_include_directives.write (writer);
writer.write_newline ();
+ source_type_declaration.write_combined (writer);
+ writer.write_newline ();
+ source_type_definition.write_combined (writer);
+ writer.write_newline ();
source_type_member_declaration.write_declaration (writer);
writer.write_newline ();
source_type_member_declaration.write (writer);
@@ -346,6 +352,8 @@
header_constant_declaration = null;
source_begin = null;
source_include_directives = null;
+ source_type_declaration = null;
+ source_type_definition = null;
source_type_member_declaration = null;
source_constant_declaration = null;
source_type_member_definition = null;
Modified: trunk/gobject/valaccodegeneratorstruct.vala
==============================================================================
--- trunk/gobject/valaccodegeneratorstruct.vala (original)
+++ trunk/gobject/valaccodegeneratorstruct.vala Sun Apr 6 19:33:46 2008
@@ -38,8 +38,8 @@
decl_frag = header_type_declaration;
def_frag = header_type_definition;
} else {
- decl_frag = source_type_member_declaration;
- def_frag = source_type_member_declaration;
+ decl_frag = source_type_declaration;
+ def_frag = source_type_definition;
}
if (st.source_reference.file.cycle == null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]