summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-08-22 01:13:13 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-08-22 01:13:13 (GMT)
commit9a0d70bbe850de0895b6508186438831d07bf2bf (patch)
tree120a82370e8ae4b3a477586e3e38d88833b22381 /generic/tclBasic.c
parent4837b605c2c1f2aa65ba75d080a2cb5076303abd (diff)
parent5fa41623af2f5fefeee57120e605c491d5dd4edd (diff)
downloadtcl-9a0d70bbe850de0895b6508186438831d07bf2bf.zip
tcl-9a0d70bbe850de0895b6508186438831d07bf2bf.tar.gz
tcl-9a0d70bbe850de0895b6508186438831d07bf2bf.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c39
1 files changed, 15 insertions, 24 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 8ac5781..d35af46 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -133,7 +133,6 @@ static Tcl_NRPostProc NRCoroutineCallerCallback;
static Tcl_NRPostProc NRCoroutineExitCallback;
static int NRCommand(ClientData data[], Tcl_Interp *interp, int result);
-static Tcl_NRPostProc NRRunObjProc;
static Tcl_ObjCmdProc OldMathFuncProc;
static void OldMathFuncDeleteProc(ClientData clientData);
static void ProcessUnexpectedResult(Tcl_Interp *interp,
@@ -159,6 +158,7 @@ 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;
static Tcl_NRPostProc NRPostInvoke;
@@ -4239,15 +4239,22 @@ TclNREvalObjv(
*cmdPtrPtr = cmdPtr;
cmdPtr->refCount++;
- /*
- * Find the objProc to call: nreProc if available, objProc otherwise. Push
- * a callback to do the actual running.
- */
+ TclNRAddCallback(interp, Dispatch, cmdPtr, INT2PTR(objc), objv, NULL);
+ return TCL_OK;
+}
+
+static int
+Dispatch(
+ ClientData data[],
+ Tcl_Interp *interp,
+ int result)
+{
+ Command *cmdPtr = data[0];
+ int objc = PTR2INT(data[1]);
+ Tcl_Obj **objv = data[2];
if (cmdPtr->nreProc) {
- TclNRAddCallback(interp, NRRunObjProc, cmdPtr,
- INT2PTR(objc), (ClientData) objv, NULL);
- return TCL_OK;
+ return cmdPtr->nreProc(cmdPtr->objClientData, interp, objc, objv);
} else {
return cmdPtr->objProc(cmdPtr->objClientData, interp, objc, objv);
}
@@ -4329,22 +4336,6 @@ NRCommand(
return result;
}
-
-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);
-}
-
/*
*----------------------------------------------------------------------