]> www.ginac.de Git - ginac.git/blobdiff - cint/dummies.pl
more modifications for future cints with correct namespace handling
[ginac.git] / cint / dummies.pl
index 890bafe8dd258c071d8e2946401af6594eeb52e3..4da0b81277844ceac9ace599852e51939187770e 100644 (file)
@@ -44,6 +44,9 @@ $opening=<<END_OF_OPENING;
  *  Please do not modify it directly, edit the perl script instead!
  */
 
+#if (!defined(G_CINTVERSION)) || (G_CINTVERSION < 501437)
+// this dummy file seems to be no longer needed for cint >= 5.14.37
+
 END_OF_OPENING
 
 print OUT $opening;
@@ -201,6 +204,8 @@ inline_function_1p('bool','is_zero');
 inline_function_2p('simp_lor','lor_g');
 inline_single_function_2p('simp_lor','lor_vec','const string &','','const basic &','ex');
 
+print OUT "\n#endif // (!defined(G_CINTVERSION)) || (G_CINTVERSION < 501437)\n";
+
 close OUT;
 
 # Create a file containing stubs that may be necessary because Cint always
@@ -219,7 +224,7 @@ $opening=<<END_OF_OPENING;
 #include <ginac/function.h>
 
 #ifndef NO_NAMESPACE_GINAC
-using namespace GiNaC;
+namespace GiNaC {
 #endif // ndef NO_NAMESPACE_GINAC
 
 END_OF_OPENING
@@ -227,6 +232,16 @@ END_OF_OPENING
 print OUT $opening;
 print OUT "void ginsh_get_ginac_functions(void) { }\n";
 
+$closing=<<END_OF_CLOSING;
+
+#ifndef NO_NAMESPACE_GINAC
+}
+#endif // ndef NO_NAMESPACE_GINAC
+
+END_OF_CLOSING
+
+print OUT $closing;
+
 close OUT;
 
 # Create dummies