summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2005-11-20 18:23:03 (GMT)
committerjenglish <jenglish@flightlab.com>2005-11-20 18:23:03 (GMT)
commit697fc6f988df717f0b7b05f1054f0e79ccf6c15e (patch)
tree2c179183e9ca0ccf1e987a71acad3e182f231b96 /generic
parentd97668ebc72a19373c62850e8b3e461c428c8f92 (diff)
downloadtcl-697fc6f988df717f0b7b05f1054f0e79ccf6c15e.zip
tcl-697fc6f988df717f0b7b05f1054f0e79ccf6c15e.tar.gz
tcl-697fc6f988df717f0b7b05f1054f0e79ccf6c15e.tar.bz2
Don't set tclStubsPtr to 0 when Tcl_PkgRequireEx() fails
[Fix for #1091431 "Tcl_InitStubs failure crashes wish"]
Diffstat (limited to 'generic')
-rw-r--r--generic/tclStubLib.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c
index c650dac..466a003 100644
--- a/generic/tclStubLib.c
+++ b/generic/tclStubLib.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclStubLib.c,v 1.6 2002/12/04 07:07:59 hobbs Exp $
+ * RCS: @(#) $Id: tclStubLib.c,v 1.6.2.1 2005/11/20 18:23:03 jenglish Exp $
*/
/*
@@ -33,9 +33,6 @@
* functions should be built as non-exported symbols.
*/
-#undef TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLEXPORT
-
TclStubs *tclStubsPtr = NULL;
TclPlatStubs *tclPlatStubsPtr = NULL;
TclIntStubs *tclIntStubsPtr = NULL;
@@ -87,7 +84,7 @@ Tcl_InitStubs (interp, version, exact)
int exact;
{
CONST char *actualVersion = NULL;
- TclStubs *tmp;
+ ClientData pkgData = NULL;
/*
* We can't optimize this check by caching tclStubsPtr because
@@ -100,12 +97,11 @@ Tcl_InitStubs (interp, version, exact)
return NULL;
}
- actualVersion = Tcl_PkgRequireEx(interp, "Tcl", version, exact,
- (ClientData *) &tmp);
+ actualVersion = Tcl_PkgRequireEx(interp, "Tcl", version, exact, &pkgData);
if (actualVersion == NULL) {
- tclStubsPtr = NULL;
return NULL;
}
+ tclStubsPtr = (TclStubs*)pkgData;
if (tclStubsPtr->hooks) {
tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs;