summaryrefslogtreecommitdiffstats
path: root/generic/tclOO.h
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-10-02 09:41:01 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-10-02 09:41:01 (GMT)
commit6671b7930273fc4c18dedbe929e2f3d67e1dedf0 (patch)
tree20b8febbf935a2c0c9d9dbaf506f4897739612ec /generic/tclOO.h
parent548a9adad7f576388cea59eeb7c057568f512195 (diff)
downloadtcl-6671b7930273fc4c18dedbe929e2f3d67e1dedf0.zip
tcl-6671b7930273fc4c18dedbe929e2f3d67e1dedf0.tar.gz
tcl-6671b7930273fc4c18dedbe929e2f3d67e1dedf0.tar.bz2
Fix TclOO API export rules.
Diffstat (limited to 'generic/tclOO.h')
-rw-r--r--generic/tclOO.h33
1 files changed, 18 insertions, 15 deletions
diff --git a/generic/tclOO.h b/generic/tclOO.h
index d5ab8a0..4a6cda7 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,21 @@ 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)
+
/*
* These are opaque types.
*/
@@ -130,6 +130,9 @@ typedef struct {
#include "tclOODecls.h"
+#ifdef __cplusplus
+}
+#endif
#endif
/*