Commit 918761c6 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

fix some issues with memory management of includes lists

2007-07-23  Juerg Billeter  <j@bitron.ch>

	* vala/valasourcefile.vala, gobject/valacodegeneratorsourcefile.vala:
	  fix some issues with memory management of includes lists

svn path=/trunk/; revision=375
parent d331f73d
2007-07-23 Jürg Billeter <j@bitron.ch>
* vala/valasourcefile.vala, gobject/valacodegeneratorsourcefile.vala:
fix some issues with memory management of includes lists
2007-07-23 Jürg Billeter <j@bitron.ch>
* vala/valainterface.vala, vala/valainterfacewriter.vala,
......
......@@ -50,7 +50,7 @@ public class Vala.CodeGenerator {
header_begin.append (new CCodeIncludeDirective ("glib-object.h"));
source_include_directives.append (new CCodeIncludeDirective (source_file.get_cheader_filename (), true));
List<weak string> used_includes = null;
List<string> used_includes = null;
used_includes.append ("glib.h");
used_includes.append ("glib-object.h");
used_includes.append (source_file.get_cheader_filename ());
......
......@@ -226,21 +226,29 @@ public class Vala.SourceFile {
if (dep_type == SourceFileDependencyType.SOURCE) {
if (s.source_reference.file.pkg) {
source_external_includes.concat (s.get_cheader_filenames ());
foreach (string fn in s.get_cheader_filenames ()) {
source_external_includes.append (fn);
}
} else {
source_internal_includes.concat (s.get_cheader_filenames ());
foreach (string fn in s.get_cheader_filenames ()) {
source_internal_includes.append (fn);
}
}
return;
}
if (s.source_reference.file.pkg) {
/* external package */
header_external_includes.concat (s.get_cheader_filenames ());
foreach (string fn in s.get_cheader_filenames ()) {
header_external_includes.append (fn);
}
return;
}
if (dep_type == SourceFileDependencyType.HEADER_FULL || (s is DataType && !((DataType)s).is_reference_type ())) {
header_internal_includes.concat (s.get_cheader_filenames ());
foreach (string fn in s.get_cheader_filenames ()) {
header_internal_includes.append (fn);
}
header_internal_full_dependencies.append (s.source_reference.file);
}
......
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