diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-12-04 14:28:05 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-12-04 14:28:05 (GMT) |
commit | f6e907f74bbe282836b805a07969dba5bb152d6a (patch) | |
tree | eea70cfba544f960fa7c10c4b4591446363b73ea /generic/tclLoad.c | |
parent | 5b235b69d517aa8db6f124990b7eb3bd0e37f4be (diff) | |
parent | 4f028801329088a592139290fa378e51d1b5cbb5 (diff) | |
download | tcl-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.c | 13 |
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; |