summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-08-20 14:00:05 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-08-20 14:00:05 (GMT)
commit107aa17d8d2388a56f1fd3374e8b49b135e1ae41 (patch)
treef1fb40f4652fc296ef47fbaa3e99a692d267083a /generic/tclBasic.c
parent7f660cabfb7f9a21f1a60e6e2b06cbd9449b8d13 (diff)
downloadtcl-107aa17d8d2388a56f1fd3374e8b49b135e1ae41.zip
tcl-107aa17d8d2388a56f1fd3374e8b49b135e1ae41.tar.gz
tcl-107aa17d8d2388a56f1fd3374e8b49b135e1ae41.tar.bz2
Push out a trial patch for more eyes to see.
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 020f2f2..ca49bec 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -161,6 +161,8 @@ static Tcl_NRPostProc TEOV_NotFoundCallback;
static Tcl_NRPostProc TEOV_RestoreVarFrame;
static Tcl_NRPostProc TEOV_RunLeaveTraces;
+static Tcl_NRPostProc Dispatch;
+
static Tcl_ObjCmdProc NRCoroInjectObjCmd;
MODULE_SCOPE const TclStubs tclStubs;
@@ -4234,6 +4236,9 @@ TclNREvalObjv(
*cmdPtrPtr = cmdPtr;
cmdPtr->refCount++;
+ 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.
@@ -4252,6 +4257,23 @@ TclNREvalObjv(
}
}
+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) {
+ return cmdPtr->nreProc(cmdPtr->objClientData, interp, objc, objv);
+ } else {
+ return cmdPtr->objProc(cmdPtr->objClientData, interp, objc, objv);
+ }
+}
+
int
TclNRRunCallbacks(
Tcl_Interp *interp,