Overview
| Artifact ID: | cde50ee4365f7895af21cb114c68aa0230b65b8d |
|---|---|
| Ticket: | 2383005fffffffffffffffffffffffffffffffff
return -errorcode accepts non-list argument |
| User & Date: | ferrieux on 2010-03-18 06:41:51 |
Changes
- icomment:
A simple way out would be in the non-compiled Tcl_ReturnObjCmd to exchange the two statements: code = TclProcessReturn(interp, code, level, returnOpts); if (explicitResult) { Tcl_SetObjResult(interp, objv[objc-1]); } yielding: if (explicitResult) { Tcl_SetObjResult(interp, objv[objc-1]); } code = TclProcessReturn(interp, code, level, returnOpts); however, doing the same in INST_RETURN_IMM in TEBC implies setting the result twice in the OK case (since the TOS ends up in the result), and I dare not (speed). Another option, as suggested before, is to add a high bit to TCL_ERROR, that would be intercepted immediately on return from TclProcessReturn, meaning TCL_ERROR_DURING_RETURN. Ugly too. Advice ? - login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"