append the generated free function to the right file fragment
authorJuerg Billeter <j@bitron.ch>
Sat, 8 Sep 2007 15:30:53 +0000 (15:30 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Sat, 8 Sep 2007 15:30:53 +0000 (15:30 +0000)
2007-09-08  Juerg Billeter  <j@bitron.ch>

* gobject/valacodegeneratorclass.vala: append the generated free
  function to the right file fragment

svn path=/trunk/; revision=591

ChangeLog
gobject/valacodegeneratorclass.vala

index 51abe04..abbf890 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-09-08  Jürg Billeter  <j@bitron.ch>
 
+       * gobject/valacodegeneratorclass.vala: append the generated free
+         function to the right file fragment
+
+2007-09-08  Jürg Billeter  <j@bitron.ch>
+
        * gobject/valacodegeneratorsignal.vala: report an error when trying to
          define a signal in a type not deriving from GLib.Object
 
index d50db81..20cdd20 100644 (file)
@@ -169,7 +169,11 @@ public class Vala.CodeGenerator {
 
                        function.add_parameter (new CCodeFormalParameter ("self", cl.get_cname () + "*"));
 
-                       decl_frag.append (function.copy ());
+                       if (cl.access != SymbolAccessibility.PRIVATE) {
+                               header_type_member_declaration.append (function.copy ());
+                       } else {
+                               source_type_member_declaration.append (function.copy ());
+                       }
 
                        var cblock = new CCodeBlock ();
 
@@ -182,7 +186,7 @@ public class Vala.CodeGenerator {
 
                        function.block = cblock;
 
-                       def_frag.append (function);
+                       source_type_member_definition.append (function);
                }
 
                current_type_symbol = old_type_symbol;