diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclStubLib.c | 12 |
2 files changed, 10 insertions, 8 deletions
@@ -1,3 +1,9 @@ +2005-11-20 Joe English <jenglish@users.sourceforge.net> + + * generic/tclStubLib.c: Don't set tclStubsPtr to 0 when + Tcl_PkgRequireEx() fails [Fix for #1091431 "Tcl_InitStubs failure + crashes wish"] + 2005-11-18 Miguel Sofer <msofer@users.sf.net> * tests/trace.test (trace-34.5): [Bug 1047286], added a second 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; |