summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-12 12:33:07 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-12 12:33:07 (GMT)
commit50a2019b617635acbfc1c91b00f41d57f61e1fa1 (patch)
treee25debcc2d99c05535e42ff3ed98bd74b15e4fec /generic
parent473bfc0f18451046035f638732a609fc86d5a0aa (diff)
parent155377a13fc942edef1524383465f2aa0efd92c2 (diff)
downloadtcl-50a2019b617635acbfc1c91b00f41d57f61e1fa1.zip
tcl-50a2019b617635acbfc1c91b00f41d57f61e1fa1.tar.gz
tcl-50a2019b617635acbfc1c91b00f41d57f61e1fa1.tar.bz2
merge core-8-6-branch
Diffstat (limited to 'generic')
-rw-r--r--generic/tclBasic.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index aae7ab6..c6784a0 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -8770,6 +8770,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.
@@ -8821,7 +8850,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;