diff options
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index f88ea27..b07a55d 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -15,8 +15,6 @@ * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tclBasic.c,v 1.473 2011/01/18 08:43:53 nijtmans Exp $ */ #include "tclInt.h" @@ -167,7 +165,7 @@ static Tcl_NRPostProc TEOV_RunLeaveTraces; static Tcl_NRPostProc YieldToCallback; static void ClearTailcall(Tcl_Interp *interp, - struct TEOV_callback *tailcallPtr); + struct NRE_callback *tailcallPtr); static Tcl_ObjCmdProc NRCoroInjectObjCmd; MODULE_SCOPE const TclStubs tclStubs; @@ -4109,7 +4107,7 @@ Tcl_EvalObjv( * TCL_EVAL_NOERR are currently supported. */ { int result; - TEOV_callback *rootPtr = TOP_CB(interp); + NRE_callback *rootPtr = TOP_CB(interp); result = TclNREvalObjv(interp, objc, objv, flags, NULL); return TclNRRunCallbacks(interp, result, rootPtr); @@ -4272,14 +4270,17 @@ TclNREvalObjv( */ #if 0 - objProc = cmdPtr->nreProc; - if (!objProc) { - objProc = cmdPtr->objProc; + { + Tcl_ObjCmdProc *objProc = cmdPtr->nreProc; + + if (!objProc) { + objProc = cmdPtr->objProc; + } + + TclNRAddCallback(interp, NRRunObjProc, objProc, cmdPtr->objClientData, + INT2PTR(objc), (ClientData) objv); } - objClientData = cmdPtr->objClientData; - - TclNRAddCallback(interp, NRRunObjProc, objProc, objClientData, - INT2PTR(objc), (ClientData) objv); + return TCL_OK; #else if (cmdPtr->nreProc) { TclNRAddCallback(interp, NRRunObjProc, cmdPtr->nreProc, @@ -4303,12 +4304,12 @@ int TclNRRunCallbacks( Tcl_Interp *interp, int result, - struct TEOV_callback *rootPtr) + struct NRE_callback *rootPtr) /* All callbacks down to rootPtr not inclusive * are to be run. */ { Interp *iPtr = (Interp *) interp; - TEOV_callback *callbackPtr; + NRE_callback *callbackPtr; Tcl_NRPostProc *procPtr; /* @@ -5901,7 +5902,7 @@ TclEvalObjEx( int word) /* Index of the word which is in objPtr. */ { int result = TCL_OK; - TEOV_callback *rootPtr = TOP_CB(interp); + NRE_callback *rootPtr = TOP_CB(interp); result = TclNREvalObjEx(interp, objPtr, flags, invoker, word); return TclNRRunCallbacks(interp, result, rootPtr); @@ -8106,7 +8107,7 @@ Tcl_NRCallObjProc( Tcl_Obj *const objv[]) { int result = TCL_OK; - TEOV_callback *rootPtr = TOP_CB(interp); + NRE_callback *rootPtr = TOP_CB(interp); if (TCL_DTRACE_CMD_ARGS_ENABLED()) { const char *a[10]; @@ -8258,7 +8259,7 @@ Tcl_NRCmdSwap( void TclSpliceTailcall( Tcl_Interp *interp, - TEOV_callback *tailcallPtr) + NRE_callback *tailcallPtr) { /* * Find the splicing spot: right before the NRCommand of the thing @@ -8266,7 +8267,7 @@ TclSpliceTailcall( * (used by command redirectors). */ - TEOV_callback *runPtr; + NRE_callback *runPtr; for (runPtr = TOP_CB(interp); runPtr; runPtr = runPtr->nextPtr) { if (((runPtr->procPtr) == NRCommand) && !runPtr->data[1]) { @@ -8324,7 +8325,7 @@ TclNRTailcallObjCmd( Tcl_Obj *listPtr, *nsObjPtr; Tcl_Namespace *nsPtr = (Tcl_Namespace *) iPtr->varFramePtr->nsPtr; Tcl_Namespace *ns1Ptr; - TEOV_callback *tailcallPtr; + NRE_callback *tailcallPtr; listPtr = Tcl_NewListObj(objc-1, objv+1); Tcl_IncrRefCount(listPtr); @@ -8395,7 +8396,7 @@ TailcallCleanup( static void ClearTailcall( Tcl_Interp *interp, - TEOV_callback *tailcallPtr) + NRE_callback *tailcallPtr) { TailcallCleanup(tailcallPtr->data, interp, TCL_OK); TCLNR_FREE(interp, tailcallPtr); @@ -8532,7 +8533,7 @@ YieldToCallback( /* CoroutineData *corPtr = data[0];*/ Tcl_Obj *listPtr = data[1]; ClientData nsPtr = data[2]; - TEOV_callback *cbPtr; + NRE_callback *cbPtr; /* * yieldTo: invoke the command using tailcall tech. @@ -8579,7 +8580,7 @@ DeleteCoroutine( { CoroutineData *corPtr = clientData; Tcl_Interp *interp = corPtr->eePtr->interp; - TEOV_callback *rootPtr = TOP_CB(interp); + NRE_callback *rootPtr = TOP_CB(interp); if (COR_IS_SUSPENDED(corPtr)) { TclNRRunCallbacks(interp, RewindCoroutine(corPtr,TCL_OK), rootPtr); |