summaryrefslogtreecommitdiffstats
path: root/generic/tclStubInit.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-02-05 20:53:12 (GMT)
committernijtmans <nijtmans>2010-02-05 20:53:12 (GMT)
commit9f80e538be5be980c7e52789ff2162b08db46823 (patch)
treea7fd50364b89ff5d71caa2334171f35231b0dd1c /generic/tclStubInit.c
parent66b1b7dda9580db59b81a9fe27b553015e5a65bd (diff)
downloadtcl-9f80e538be5be980c7e52789ff2162b08db46823.zip
tcl-9f80e538be5be980c7e52789ff2162b08db46823.tar.gz
tcl-9f80e538be5be980c7e52789ff2162b08db46823.tar.bz2
Follow-up to earlier commit today:
Eliminate the need for an extra Stubs Pointer for adressing a static stub table: Just change the exported table from static to MODULE_SCOPE.
Diffstat (limited to 'generic/tclStubInit.c')
-rw-r--r--generic/tclStubInit.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 40b5e89..7314c94 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclStubInit.c,v 1.185 2009/09/24 17:19:18 dgp Exp $
+ * RCS: @(#) $Id: tclStubInit.c,v 1.186 2010/02/05 20:53:12 nijtmans Exp $
*/
#include "tclInt.h"
@@ -41,9 +41,11 @@
* below should be made in the generic/tcl.decls script.
*/
+MODULE_SCOPE const TclStubs tclConstStubs;
+
/* !BEGIN!: Do not edit below this line. */
-static const TclIntStubs tclIntStubs = {
+static const TclIntStubs tclIntConstStubs = {
TCL_STUB_MAGIC,
NULL,
NULL, /* 0 */
@@ -296,7 +298,7 @@ static const TclIntStubs tclIntStubs = {
TclResetRewriteEnsemble, /* 247 */
};
-static const TclIntPlatStubs tclIntPlatStubs = {
+static const TclIntPlatStubs tclIntPlatConstStubs = {
TCL_STUB_MAGIC,
NULL,
#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
@@ -372,7 +374,7 @@ static const TclIntPlatStubs tclIntPlatStubs = {
#endif /* MACOSX */
};
-static const TclPlatStubs tclPlatStubs = {
+static const TclPlatStubs tclPlatConstStubs = {
TCL_STUB_MAGIC,
NULL,
#ifdef __WIN32__ /* WIN */
@@ -385,7 +387,7 @@ static const TclPlatStubs tclPlatStubs = {
#endif /* MACOSX */
};
-static const TclTomMathStubs tclTomMathStubs = {
+const TclTomMathStubs tclTomMathConstStubs = {
TCL_STUB_MAGIC,
NULL,
TclBN_epoch, /* 0 */
@@ -452,12 +454,12 @@ static const TclTomMathStubs tclTomMathStubs = {
};
static const TclStubHooks tclStubHooks = {
- &tclPlatStubs,
- &tclIntStubs,
- &tclIntPlatStubs
+ &tclPlatConstStubs,
+ &tclIntConstStubs,
+ &tclIntPlatConstStubs
};
-static const TclStubs tclStubs = {
+const TclStubs tclConstStubs = {
TCL_STUB_MAGIC,
&tclStubHooks,
Tcl_PkgProvideEx, /* 0 */
@@ -1114,14 +1116,3 @@ static const TclStubs tclStubs = {
};
/* !END!: Do not edit above this line. */
-
-/*
- * Module-scope pointers to the main static stubs tables, used for package
- * initialization via Tcl_PkgProvideEx().
- */
-
-MODULE_SCOPE const TclStubs * const tclConstStubsPtr;
-MODULE_SCOPE const TclTomMathStubs * const tclTomMathConstStubsPtr;
-
-const TclStubs * const tclConstStubsPtr = &tclStubs;
-const TclTomMathStubs * const tclTomMathConstStubsPtr = &tclTomMathStubs;