summaryrefslogtreecommitdiffstats
path: root/generic/tclOO.h
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2014-01-09 21:20:23 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2014-01-09 21:20:23 (GMT)
commit95a6025facddaf366bf92837026bdcafec4561ec (patch)
treefe3896fd636563de7504eb24bce205cf9f547457 /generic/tclOO.h
parentac2d8a32cbf79c952b06116a786c2466322ad368 (diff)
parenta952237bcf20a7d4140f857c095b3bf0417ca40a (diff)
downloadtcl-95a6025facddaf366bf92837026bdcafec4561ec.zip
tcl-95a6025facddaf366bf92837026bdcafec4561ec.tar.gz
tcl-95a6025facddaf366bf92837026bdcafec4561ec.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclOO.h')
-rw-r--r--generic/tclOO.h36
1 files changed, 21 insertions, 15 deletions
diff --git a/generic/tclOO.h b/generic/tclOO.h
index d5ab8a0..a6e8a22 100644
--- a/generic/tclOO.h
+++ b/generic/tclOO.h
@@ -12,21 +12,6 @@
#ifndef TCLOO_H_INCLUDED
#define TCLOO_H_INCLUDED
-#include "tcl.h"
-
-#ifndef TCLOOAPI
-# if defined(BUILD_tcl) || defined(BUILD_TclOO)
-# define TCLOOAPI MODULE_SCOPE
-# else
-# define TCLOOAPI extern
-# undef USE_TCLOO_STUBS
-# define USE_TCLOO_STUBS 1
-# endif
-#endif
-
-extern const char *TclOOInitializeStubs(
- Tcl_Interp *, const char *version);
-#define Tcl_OOInitStubs(interp) TclOOInitializeStubs((interp), TCLOO_VERSION)
/*
* Be careful when it comes to versioning; need to make sure that the
@@ -42,6 +27,24 @@ extern const char *TclOOInitializeStubs(
#define TCLOO_VERSION "1.0.1"
#define TCLOO_PATCHLEVEL TCLOO_VERSION
+#include "tcl.h"
+
+/*
+ * For C++ compilers, use extern "C"
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern const char *TclOOInitializeStubs(
+ Tcl_Interp *, const char *version);
+#define Tcl_OOInitStubs(interp) \
+ TclOOInitializeStubs((interp), TCLOO_VERSION)
+#ifndef USE_TCL_STUBS
+# define TclOOInitializeStubs(interp, version) (TCLOO_PATCHLEVEL)
+#endif
+
/*
* These are opaque types.
*/
@@ -130,6 +133,9 @@ typedef struct {
#include "tclOODecls.h"
+#ifdef __cplusplus
+}
+#endif
#endif
/*