diff options
| author | apnadkarni <apnmbx-wits@yahoo.com> | 2024-06-17 16:47:44 (GMT) |
|---|---|---|
| committer | apnadkarni <apnmbx-wits@yahoo.com> | 2024-06-17 16:47:44 (GMT) |
| commit | fb0f6d9416488b42e3bb4d758e723989fb758c6e (patch) | |
| tree | a3ff0c13ed61cbd5edde1e9bc1bee6fb7c563709 /generic/tclBasic.c | |
| parent | 3013ff330e1917f7d543a69bbbc50e19ac4e8090 (diff) | |
| download | tcl-fb0f6d9416488b42e3bb4d758e723989fb758c6e.zip tcl-fb0f6d9416488b42e3bb4d758e723989fb758c6e.tar.gz tcl-fb0f6d9416488b42e3bb4d758e723989fb758c6e.tar.bz2 | |
Remove tcl::unsupported::inject
Diffstat (limited to 'generic/tclBasic.c')
| -rw-r--r-- | generic/tclBasic.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index dfed030..98a0579 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -237,7 +237,6 @@ static Tcl_NRPostProc TEOV_RunLeaveTraces; static Tcl_NRPostProc EvalObjvCore; static Tcl_NRPostProc Dispatch; -static Tcl_ObjCmdProc NRInjectObjCmd; static Tcl_NRPostProc NRPostInvoke; static Tcl_ObjCmdProc CoroTypeObjCmd; static Tcl_ObjCmdProc TclNRCoroInjectObjCmd; @@ -1196,8 +1195,6 @@ Tcl_CreateInterp(void) cmdPtr->compileProc = &TclCompileAssembleCmd; /* Coroutine monkeybusiness */ - Tcl_NRCreateCommand(interp, "::tcl::unsupported::inject", NULL, - NRInjectObjCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "::tcl::unsupported::corotype", CoroTypeObjCmd, NULL, NULL); @@ -9658,61 +9655,6 @@ InjectHandlerPostCall( return result; } -/* - *---------------------------------------------------------------------- - * - * NRInjectObjCmd -- - * - * Implementation of [::tcl::unsupported::inject] command. - * - *---------------------------------------------------------------------- - */ - -static int -NRInjectObjCmd( - TCL_UNUSED(void *), - Tcl_Interp *interp, - int objc, - Tcl_Obj *const objv[]) -{ - CoroutineData *corPtr; - ExecEnv *savedEEPtr = iPtr->execEnvPtr; - - /* - * Usage more or less like tailcall: - * inject coroName cmd ?arg1 arg2 ...? - */ - - if (objc < 3) { - Tcl_WrongNumArgs(interp, 1, objv, "coroName cmd ?arg1 arg2 ...?"); - return TCL_ERROR; - } - - corPtr = GetCoroutineFromObj(interp, objv[1], - "can only inject a command into a coroutine"); - if (!corPtr) { - return TCL_ERROR; - } - if (!COR_IS_SUSPENDED(corPtr)) { - Tcl_SetObjResult(interp, Tcl_NewStringObj( - "can only inject a command into a suspended coroutine", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "ACTIVE", (char *)NULL); - return TCL_ERROR; - } - - /* - * Add the callback to the coro's execEnv, so that it is the first thing - * to happen when the coro is resumed. - */ - - iPtr->execEnvPtr = corPtr->eePtr; - TclNRAddCallback(interp, TclNREvalList, Tcl_NewListObj(objc - 2, objv + 2), - NULL, NULL, NULL); - iPtr->execEnvPtr = savedEEPtr; - - return TCL_OK; -} - int TclNRInterpCoroutine( void *clientData, |
