diff options
author | dgp <dgp@users.sourceforge.net> | 2012-04-19 12:57:45 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-04-19 12:57:45 (GMT) |
commit | b8074d77342d4166a599b933a111edd467153894 (patch) | |
tree | b4b43a26edd2410ea92c727e56b8d91d2c00b5af /generic/tclStubLib.c | |
parent | e76fa60cb994bd0ad5fce8614a682f88e65c2e8a (diff) | |
download | tcl-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.c | 9 |
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; } |