summaryrefslogtreecommitdiffstats
path: root/generic/tclLoad.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-12-04 14:28:05 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-12-04 14:28:05 (GMT)
commitf6e907f74bbe282836b805a07969dba5bb152d6a (patch)
treeeea70cfba544f960fa7c10c4b4591446363b73ea /generic/tclLoad.c
parent5b235b69d517aa8db6f124990b7eb3bd0e37f4be (diff)
parent4f028801329088a592139290fa378e51d1b5cbb5 (diff)
downloadtcl-novem_reduced_bytecodes.zip
tcl-novem_reduced_bytecodes.tar.gz
tcl-novem_reduced_bytecodes.tar.bz2
merge main novem branchnovem_reduced_bytecodes
Diffstat (limited to 'generic/tclLoad.c')
-rw-r--r--generic/tclLoad.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/generic/tclLoad.c b/generic/tclLoad.c
index 6f5b9cf..75e513d 100644
--- a/generic/tclLoad.c
+++ b/generic/tclLoad.c
@@ -470,10 +470,15 @@ Tcl_LoadObjCmd(
if (code != TCL_OK) {
Interp *iPtr = (Interp *) target;
- if (iPtr->result != NULL && iPtr->result[0] != '\0') {
- /* We have an Tcl 8.x extension with incompatible stub table. */
- Tcl_Obj *obj = Tcl_NewStringObj(iPtr->result, -1);
- Tcl_SetObjResult(interp, obj);
+ if (iPtr->legacyResult && !iPtr->legacyFreeProc) {
+ /*
+ * A call to Tcl_InitStubs() determined the caller extension and
+ * this interp are incompatible in their stubs mechanisms, and
+ * recorded the error in the oldest legacy place we have to do so.
+ */
+ Tcl_SetObjResult(target, Tcl_NewStringObj(iPtr->legacyResult, -1));
+ iPtr->legacyResult = NULL;
+ iPtr->legacyFreeProc = (void (*) (void))-1;
}
Tcl_TransferResult(target, code, interp);
goto done;