summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-08-21 19:18:28 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-08-21 19:18:28 (GMT)
commitcb779b2f4466180ab1678cc0a9e38159704b7efd (patch)
tree240f9e28b54823c081efd68cb198f033dfeaa371
parent88f6a82f096bab2c48289cf27f99c6f2df66da9b (diff)
downloadtcl-dgp_purge_NRRunObjProc.zip
tcl-dgp_purge_NRRunObjProc.tar.gz
tcl-dgp_purge_NRRunObjProc.tar.bz2
Tidy the code and add a test.dgp_purge_NRRunObjProc
-rw-r--r--generic/tclBasic.c39
-rw-r--r--tests/coroutine.test9
2 files changed, 9 insertions, 39 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index ca49bec..c1032f9 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -133,9 +133,6 @@ static Tcl_NRPostProc NRCoroutineCallerCallback;
static Tcl_NRPostProc NRCoroutineExitCallback;
static int NRCommand(ClientData data[], Tcl_Interp *interp, int result);
-#if 0
-static Tcl_NRPostProc NRRunObjProc;
-#endif
static Tcl_ObjCmdProc OldMathFuncProc;
static void OldMathFuncDeleteProc(ClientData clientData);
static void ProcessUnexpectedResult(Tcl_Interp *interp,
@@ -160,7 +157,6 @@ static Tcl_NRPostProc TEOV_Exception;
static Tcl_NRPostProc TEOV_NotFoundCallback;
static Tcl_NRPostProc TEOV_RestoreVarFrame;
static Tcl_NRPostProc TEOV_RunLeaveTraces;
-
static Tcl_NRPostProc Dispatch;
static Tcl_ObjCmdProc NRCoroInjectObjCmd;
@@ -4238,23 +4234,6 @@ TclNREvalObjv(
TclNRAddCallback(interp, Dispatch, cmdPtr, INT2PTR(objc), objv, NULL);
return TCL_OK;
-
- /*
- * Find the objProc to call: nreProc if available, objProc otherwise. Push
- * a callback to do the actual running.
- */
-
- if (cmdPtr->nreProc) {
-#if 0
- TclNRAddCallback(interp, NRRunObjProc, cmdPtr,
- INT2PTR(objc), (ClientData) objv, NULL);
- return TCL_OK;
-#else
- return cmdPtr->nreProc(cmdPtr->objClientData, interp, objc, objv);
-#endif
- } else {
- return cmdPtr->objProc(cmdPtr->objClientData, interp, objc, objv);
- }
}
static int
@@ -4350,24 +4329,6 @@ NRCommand(
return result;
}
-
-#if 0
-static int
-NRRunObjProc(
- ClientData data[],
- Tcl_Interp *interp,
- int result)
-{
- /* OPT: do not call? */
-
- Command* cmdPtr = data[0];
- int objc = PTR2INT(data[1]);
- Tcl_Obj **objv = data[2];
-
- return cmdPtr->nreProc(cmdPtr->objClientData, interp, objc, objv);
-}
-#endif
-
/*
*----------------------------------------------------------------------
diff --git a/tests/coroutine.test b/tests/coroutine.test
index 1d9040b..faa5a42 100644
--- a/tests/coroutine.test
+++ b/tests/coroutine.test
@@ -609,6 +609,15 @@ test coroutine-7.3 {yielding between coroutines} -body {
} -cleanup {
catch {rename juggler ""}
} -result {{{a b c d e} ::j1 {a b c d} ::j2 {a b c} ::j3 {a b} ::j1 a ::j2} {} {} {}}
+
+test coroutine-7.4 {Bug 8ff0cb9fe1} -setup {
+ proc foo {a b} {catch yield; return 1}
+} -cleanup {
+ rename foo {}
+} -body {
+ coroutine demo lsort -command foo {a b}
+} -result {b a}
+
# cleanup
unset lambda