do not add includes to oneself
authorRaffaele Sandrini <raffaele@sandrini.ch>
Sat, 21 Jul 2007 12:26:56 +0000 (12:26 +0000)
committerRaffaele Sandrini <rasa@src.gnome.org>
Sat, 21 Jul 2007 12:26:56 +0000 (12:26 +0000)
2007-07-21 Raffaele Sandrini  <raffaele@sandrini.ch>

* vala/valasourcefile.vala: do not add includes to oneself

svn path=/trunk/; revision=363

ChangeLog
vala/valasourcefile.vala

index 0c3a3e1..946db03 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-07-21  Raffaele Sandrini  <raffaele@sandrini.ch>
+
+       * vala/valasourcefile.vala: do not add includes to oneself
+
 2007-07-17  Jürg Billeter  <j@bitron.ch>
 
        * vala/valaarray.vala, vala/valadatatype.vala, vala/valapointer.vala:
index 927e220..d04ecde 100644 (file)
@@ -281,7 +281,10 @@ public class Vala.SourceFile {
         * @param include internal include for C header file
         */
        public void add_header_internal_include (string! include) {
-               header_internal_includes.append (include);
+               /* skip includes to self */
+               if (include != get_cinclude_filename ()) {
+                       header_internal_includes.append (include);
+               }
        }
        
        /**