diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-11 13:58:49 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-11 13:58:49 (GMT) |
commit | 1dd0bb1ddca878a48f9d226c2ad859665022eaaf (patch) | |
tree | c187bb8f934f78b6280291fb3e0748e5a7dd5038 | |
parent | e5fe428a4336e7ec7bf809c207bbf610877bb21e (diff) | |
download | tcl-1dd0bb1ddca878a48f9d226c2ad859665022eaaf.zip tcl-1dd0bb1ddca878a48f9d226c2ad859665022eaaf.tar.gz tcl-1dd0bb1ddca878a48f9d226c2ad859665022eaaf.tar.bz2 |
More tweaks
-rw-r--r-- | generic/tclBasic.c | 8 | ||||
-rw-r--r-- | generic/tclExecute.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 1131a09..4e56088 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -233,8 +233,8 @@ MODULE_SCOPE const TclStubs tclStubs; * after particular kinds of [yield]. */ -#define CORO_ACTIVATE_YIELD (0) -#define CORO_ACTIVATE_YIELDM (1) +#define CORO_ACTIVATE_YIELD NULL +#define CORO_ACTIVATE_YIELDM INT2PTR(1) #define COROUTINE_ARGUMENTS_SINGLE_OPTIONAL (-1) #define COROUTINE_ARGUMENTS_ARBITRARY (-2) @@ -9563,7 +9563,7 @@ TclNRYieldToObjCmd( corPtr->yieldPtr = listPtr; iPtr->execEnvPtr = corPtr->eePtr; - return TclNRYieldObjCmd(INT2PTR(CORO_ACTIVATE_YIELDM), interp, 1, objv); + return TclNRYieldObjCmd(CORO_ACTIVATE_YIELDM, interp, 1, objv); } static int @@ -9778,7 +9778,7 @@ TclNRCoroutineActivateCallback( return TCL_ERROR; } - int type = PTR2INT(data[1]); + void *type = data[1]; if (type == CORO_ACTIVATE_YIELD) { corPtr->nargs = COROUTINE_ARGUMENTS_SINGLE_OPTIONAL; } else if (type == CORO_ACTIVATE_YIELDM) { diff --git a/generic/tclExecute.c b/generic/tclExecute.c index a890d83..0ec2404 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -2425,7 +2425,7 @@ TEBCresume( { CoroutineData *corPtr; - int yieldParameter; + void *yieldParameter; case INST_YIELD: corPtr = iPtr->execEnvPtr->corPtr; @@ -2453,7 +2453,7 @@ TEBCresume( fflush(stdout); } #endif - yieldParameter = PTR2INT(NULL); /*==CORO_ACTIVATE_YIELD*/ + yieldParameter = NULL; /*==CORO_ACTIVATE_YIELD*/ Tcl_SetObjResult(interp, OBJ_AT_TOS); goto doYield; @@ -2508,7 +2508,7 @@ TEBCresume( TclSetTailcall(interp, valuePtr); corPtr->yieldPtr = valuePtr; iPtr->execEnvPtr = corPtr->eePtr; - yieldParameter = PTR2INT(NULL)+1; /*==CORO_ACTIVATE_YIELDM*/ + yieldParameter = INT2PTR(1); /*==CORO_ACTIVATE_YIELDM*/ doYield: /* TIP #280: Record the last piece of info needed by @@ -2526,7 +2526,7 @@ TEBCresume( cleanup = 1; TEBC_YIELD(); TclNRAddCallback(interp, TclNRCoroutineActivateCallback, corPtr, - INT2PTR(yieldParameter), NULL, NULL); + yieldParameter, NULL, NULL); return TCL_OK; } |