summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-03-13 00:31:42 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-03-13 00:31:42 (GMT)
commit1eaffe477b0ae6538983f20134f28711e94ecdbd (patch)
tree83a15aefe96348caa1e582a2a3e25353e1518438 /generic/tclExecute.c
parent2975be40db4d0316ebc1a6bfd1a9174f80e069c8 (diff)
parent719ebb0c3b4300c2a81db3b1dc88e6dd4359f4b8 (diff)
downloadtcl-1eaffe477b0ae6538983f20134f28711e94ecdbd.zip
tcl-1eaffe477b0ae6538983f20134f28711e94ecdbd.tar.gz
tcl-1eaffe477b0ae6538983f20134f28711e94ecdbd.tar.bz2
Coroutine cleanup: clarify 'yieldparameter' value. Use less C stackspace
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 0279218..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 = 0;
+ 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;
}