summaryrefslogtreecommitdiffstats
path: root/generic/tclStubLibTbl.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-06-21 11:53:11 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-06-21 11:53:11 (GMT)
commitc12c83e799a79e5d1faa3dc446e1ef322eaa31fd (patch)
treed72e35d30860709dafe2eee62ea82000b7ed190f /generic/tclStubLibTbl.c
parentbd74c3a8549b56bbbf082f0d92034cdd58c43eb8 (diff)
downloadtcl-c12c83e799a79e5d1faa3dc446e1ef322eaa31fd.zip
tcl-c12c83e799a79e5d1faa3dc446e1ef322eaa31fd.tar.gz
tcl-c12c83e799a79e5d1faa3dc446e1ef322eaa31fd.tar.bz2
Modify internal TclStubInfoType type: use TclStubs * in stead of ClientData, so less type casts are needed in the code.
Disadvantage: somewhat more code duplication, but it makes the code much more understandable.
Diffstat (limited to 'generic/tclStubLibTbl.c')
-rw-r--r--generic/tclStubLibTbl.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/generic/tclStubLibTbl.c b/generic/tclStubLibTbl.c
index 0ed057f..0391502 100644
--- a/generic/tclStubLibTbl.c
+++ b/generic/tclStubLibTbl.c
@@ -13,17 +13,6 @@
#include "tclInt.h"
-MODULE_SCOPE const TclStubs *tclStubsPtr;
-MODULE_SCOPE const TclPlatStubs *tclPlatStubsPtr;
-MODULE_SCOPE const TclIntStubs *tclIntStubsPtr;
-MODULE_SCOPE const TclIntPlatStubs *tclIntPlatStubsPtr;
-
-const TclStubs *tclStubsPtr = NULL;
-const TclPlatStubs *tclPlatStubsPtr = NULL;
-const TclIntStubs *tclIntStubsPtr = NULL;
-const TclIntPlatStubs *tclIntPlatStubsPtr = NULL;
-
-
/*
*----------------------------------------------------------------------
*
@@ -45,8 +34,7 @@ TclInitStubTable(
const char *version) /* points to the version field of a
TclStubInfoType structure variable. */
{
- const TclStubInfoType *ptr = (const TclStubInfoType *) version;
- tclStubsPtr = (const TclStubs *) ptr->data;
+ tclStubsPtr = ((const TclStubInfoType *) version)->stubs;
if (tclStubsPtr->hooks) {
tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs;
@@ -57,6 +45,7 @@ TclInitStubTable(
tclIntStubsPtr = NULL;
tclIntPlatStubsPtr = NULL;
}
+
return version;
}