diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-12-13 16:59:33 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-12-13 16:59:33 (GMT) |
| commit | d06a5c4c22214e8bcdab307afca8c8698c6831eb (patch) | |
| tree | 6ea5cbab79d2c102863c12c9e7c8e5708a9e48fd /generic/tclStubLib.c | |
| parent | 29be47f4511520e0e8efac664661d17195c8fea1 (diff) | |
| parent | 56c8c7f4a2740ed010d79e0de78b0f1ed9d88c82 (diff) | |
| download | tcl-d06a5c4c22214e8bcdab307afca8c8698c6831eb.zip tcl-d06a5c4c22214e8bcdab307afca8c8698c6831eb.tar.gz tcl-d06a5c4c22214e8bcdab307afca8c8698c6831eb.tar.bz2 | |
Merge 8.7
Diffstat (limited to 'generic/tclStubLib.c')
| -rw-r--r-- | generic/tclStubLib.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index 22e8b9b..46d2f90 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -4,8 +4,8 @@ * Stub object that will be statically linked into extensions that want * to access Tcl. * - * Copyright (c) 1998-1999 by Scriptics Corporation. - * Copyright (c) 1998 Paul Duffin. + * Copyright © 1998-1999 Scriptics Corporation. + * Copyright © 1998 Paul Duffin. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -54,10 +54,11 @@ Tcl_InitStubs( int exact, int magic) { - Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *)interp; const char *actualVersion = NULL; ClientData pkgData = NULL; const TclStubs *stubsPtr = iPtr->stubTable; + const char *tclName = (((exact&0xFF00) >= 0x900) ? "tcl" : "Tcl"); /* * We can't optimize this check by caching tclStubsPtr because that @@ -67,11 +68,11 @@ Tcl_InitStubs( if (!stubsPtr || (stubsPtr->magic != (((exact&0xFF00) >= 0x900) ? magic : TCL_STUB_MAGIC))) { iPtr->result = (char *)"interpreter uses an incompatible stubs mechanism"; - iPtr->freeProc = 0; + iPtr->freeProc = 0; /* TCL_STATIC */ return NULL; } - actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 0, &pkgData); + actualVersion = stubsPtr->tcl_PkgRequireEx(interp, tclName, version, 0, &pkgData); if (actualVersion == NULL) { return NULL; } @@ -91,11 +92,11 @@ Tcl_InitStubs( } if (*p || ISDIGIT(*q)) { /* Construct error message */ - stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 1, NULL); + stubsPtr->tcl_PkgRequireEx(interp, tclName, version, 1, NULL); return NULL; } } else { - actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 1, NULL); + actualVersion = stubsPtr->tcl_PkgRequireEx(interp, tclName, version, 1, NULL); if (actualVersion == NULL) { return NULL; } |
