diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-01-25 09:12:32 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-01-25 09:12:32 (GMT) |
commit | f09de888df51736f6e35a190ee1eef87b39048cf (patch) | |
tree | 93d71e0e3d9c75d1e0a055d9fb0c61a59c950344 /generic/tclStubLib.c | |
parent | 51db664c7d3fa5bc0a1c216ac3ee89c1eeba6f09 (diff) | |
parent | ee29bbd769ed711e5e7faa7c838d23a8092cc3d1 (diff) | |
download | tcl-f09de888df51736f6e35a190ee1eef87b39048cf.zip tcl-f09de888df51736f6e35a190ee1eef87b39048cf.tar.gz tcl-f09de888df51736f6e35a190ee1eef87b39048cf.tar.bz2 |
Merge trunk
Rename TclInitStubs back to Tcl_InitStubs, for easier compatibility with Tcl 8.
Diffstat (limited to 'generic/tclStubLib.c')
-rw-r--r-- | generic/tclStubLib.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index eefa300..cadb7b9 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -32,7 +32,7 @@ const TclIntPlatStubs *tclIntPlatStubsPtr = NULL; /* *---------------------------------------------------------------------- * - * TclInitStubs -- + * Tcl_InitStubs -- * * Tries to initialise the stub table pointers and ensures that the * correct version of Tcl is loaded. @@ -48,7 +48,7 @@ const TclIntPlatStubs *tclIntPlatStubsPtr = NULL; */ #undef Tcl_InitStubs MODULE_SCOPE const char * -TclInitStubs( +Tcl_InitStubs( Tcl_Interp *interp, const char *version, int exact, @@ -76,7 +76,7 @@ TclInitStubs( if (actualVersion == NULL) { return NULL; } - if (exact) { + if (exact&1) { const char *p = version; int count = 0; @@ -102,7 +102,14 @@ TclInitStubs( } } } - tclStubsPtr = (TclStubs *)pkgData; + + if (stubsPtr->reserved77) { + /* We are running Tcl 8. Do some additional checks here. */ + tclStubsPtr = (TclStubs *)pkgData; + } else { + /* We are running Tcl 9. Do some additional checks here. */ + tclStubsPtr = stubsPtr; + } if (tclStubsPtr->hooks) { tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs; |