summaryrefslogtreecommitdiffstats
path: root/generic/tclStubLib.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-04-19 12:57:45 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-04-19 12:57:45 (GMT)
commitb8074d77342d4166a599b933a111edd467153894 (patch)
treeb4b43a26edd2410ea92c727e56b8d91d2c00b5af /generic/tclStubLib.c
parente76fa60cb994bd0ad5fce8614a682f88e65c2e8a (diff)
downloadtcl-b8074d77342d4166a599b933a111edd467153894.zip
tcl-b8074d77342d4166a599b933a111edd467153894.tar.gz
tcl-b8074d77342d4166a599b933a111edd467153894.tar.bz2
To preserve the ability of [load] to bring in mistmatched stubs-enabled
modules and react with an error rather than a crash, HasStubSupport() has to keep fiddling with the same fields as always.
Diffstat (limited to 'generic/tclStubLib.c')
-rw-r--r--generic/tclStubLib.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c
index b36627c..9e9208d 100644
--- a/generic/tclStubLib.c
+++ b/generic/tclStubLib.c
@@ -37,16 +37,13 @@ HasStubSupport(
Tcl_Interp *interp)
{
Interp *iPtr = (Interp *) interp;
- static Tcl_Obj errorMsg = {
- 2, /* Stop anything from trying to deallocate this memory! */
- "This interpreter does not support stubs-enabled extensions.",
- 59, NULL, {0}
- };
if (iPtr->stubTable && (iPtr->stubTable->magic == TCL_STUB_MAGIC)) {
return iPtr->stubTable;
}
- iPtr->objResultPtr = &errorMsg;
+ iPtr->unused3
+ = "This interpreter does not support stubs-enabled extensions.";
+ iPtr->unused4 = TCL_STATIC;
return NULL;
}