diff options
author | sebres <sebres@users.sourceforge.net> | 2017-04-12 11:49:39 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2017-04-12 11:49:39 (GMT) |
commit | 678ae92ce0730d33fb2f803b6b52c5d7b4670089 (patch) | |
tree | 8af3427df6fd2a1467f2fad7f3a9372f7038ac8e /generic | |
parent | 948bd5e9965da403d358767ce982c65b3af971ae (diff) | |
parent | a61a0e3df9df21ead49108d82842a48617cb0c09 (diff) | |
download | tcl-678ae92ce0730d33fb2f803b6b52c5d7b4670089.zip tcl-678ae92ce0730d33fb2f803b6b52c5d7b4670089.tar.gz tcl-678ae92ce0730d33fb2f803b6b52c5d7b4670089.tar.bz2 |
merge fix-42202ba1e5ff566e
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclBasic.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 4bddbce..f604ac1 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -8748,6 +8748,35 @@ TclNRCoroutineActivateCallback( /* *---------------------------------------------------------------------- * + * TclNREvalList -- + * + * Callback to invoke command as list, used in order to delayed + * processing of canonical list command in sane environment. + * + *---------------------------------------------------------------------- + */ + +static int +TclNREvalList( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + int objc; + Tcl_Obj **objv; + Tcl_Obj *listPtr = data[0]; + + Tcl_IncrRefCount(listPtr); + + TclMarkTailcall(interp); + TclNRAddCallback(interp, TclNRReleaseValues, listPtr, NULL, NULL,NULL); + TclListObjGetElements(NULL, listPtr, &objc, &objv); + return TclNREvalObjv(interp, objc, objv, 0, NULL); +} + +/* + *---------------------------------------------------------------------- + * * NRCoroInjectObjCmd -- * * Implementation of [::tcl::unsupported::inject] command. @@ -8799,7 +8828,8 @@ NRCoroInjectObjCmd( */ iPtr->execEnvPtr = corPtr->eePtr; - TclNREvalObjEx(interp, Tcl_NewListObj(objc-2, objv+2), 0, NULL, INT_MIN); + TclNRAddCallback(interp, TclNREvalList, Tcl_NewListObj(objc-2, objv+2), + NULL, NULL, NULL); iPtr->execEnvPtr = savedEEPtr; return TCL_OK; |