diff options
| author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2013-06-21 11:53:11 (GMT) |
|---|---|---|
| committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2013-06-21 11:53:11 (GMT) |
| commit | e26f463496c9a6045d94444c5882289ce17957ef (patch) | |
| tree | d72e35d30860709dafe2eee62ea82000b7ed190f /generic/tclStubLibTbl.c | |
| parent | 8cb955a59938f193dcc5fa7b540e39a6e770d2b7 (diff) | |
| download | tcl-e26f463496c9a6045d94444c5882289ce17957ef.zip tcl-e26f463496c9a6045d94444c5882289ce17957ef.tar.gz tcl-e26f463496c9a6045d94444c5882289ce17957ef.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.c | 15 |
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; } |
