aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2005-02-01 14:58:53 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2005-02-01 14:58:53 +0000
commitcb95431b072f5519a083a59e878255c5bcab64d1 (patch)
treed36d7e7ee32fc44b5d288f244ae16ad086071fb5 /src/include
parent0026d529a6a0ccd030d9510858726bcd3e1e0d24 (diff)
fix a C++ namespaces bug found by Erik:
error_exit() was declared extern "C" --> it wasn't namespace-mangled --> it could conflict with a similar error_exit() in another thorn although this fix touches a *lot* of files, it's conceptually simple: * error_exit() is not extern "C" any more * everything in src/jtutil/ (which used to be in the jtutil:: namespace) is now in the AHFinderDirect::jtutil:: namespace --> all C++ code in this thorn is now inside the AHFinderDirect:: namespace git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@1395 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/include')
-rw-r--r--src/include/stdc.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/include/stdc.h b/src/include/stdc.h
index 7a3ad4d..c8a5228 100644
--- a/src/include/stdc.h
+++ b/src/include/stdc.h
@@ -53,20 +53,20 @@
/******************************************************************************/
#ifdef __cplusplus
+namespace AHFinderDirect
+ {
namespace jtutil
{
#endif
/*
- * Low-level code in this thorn is done with error_exit() . In this
- * this thorn it's a wrapper around CCTK_VWarn(msg_level, ...) . It's
- * declared to return int so it may be easily used in conditional
- * expressions like
+ * Low-level code in this thorn does error handling with error_exit() .
+ * In this this thorn this function is a wrapper around
+ * CCTK_VWarn(msg_level, ...)
+ * This function is declared to return int so it may be easily used in
+ * conditional expressions like
* foo = bar_ok ? baz(bar) : error_exit(...);
*/
-#ifdef __cplusplus
- extern "C"
-#endif
int error_exit(int msg_level, const char *format, ...)
#ifdef __GNUC__
__attribute__ ((noreturn))
@@ -88,6 +88,7 @@ int error_exit(int msg_level, const char *format, ...)
#ifdef __cplusplus
} /* namespace jtutil */
+ } /* namespace AHFinderDirect */
#endif
/******************************************************************************/