Browse Source

exclude _src files from being included

David Rose 24 years ago
parent
commit
b560a14680
1 changed files with 9 additions and 0 deletions
  1. 9 0
      dtool/src/interrogate/interrogateBuilder.cxx

+ 9 - 0
dtool/src/interrogate/interrogateBuilder.cxx

@@ -824,6 +824,15 @@ should_include(const string &filename) const {
     return false;
     return false;
   }
   }
 
 
+  // Finally, don't include *_src.h or *_src.cxx.  These are special
+  // "template" files that should not generally be included directly.
+  if (filename.length() > 6 && filename.substr(filename.length() - 6) == "_src.h") {
+    return false;
+  }
+  if (filename.length() > 8 && filename.substr(filename.length() - 8) == "_src.cxx") {
+    return false;
+  }
+
   // Otherwise, no problem.
   // Otherwise, no problem.
   return true;
   return true;
 }
 }