diff options
author | dgp <dgp@users.sourceforge.net> | 2023-01-30 15:57:39 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2023-01-30 15:57:39 (GMT) |
commit | 58446472bbe36cd9f2f074cfe5bea21a3f98d28e (patch) | |
tree | 4abe3b7dbbcc1c0d9b76d808f78398d2dcced5fa | |
parent | 5b86b255d41b6a0948597ccc8b7499efde42c4d7 (diff) | |
parent | d3dae9eba4c8d979d72feddfded60eb08835543d (diff) | |
download | tcl-58446472bbe36cd9f2f074cfe5bea21a3f98d28e.zip tcl-58446472bbe36cd9f2f074cfe5bea21a3f98d28e.tar.gz tcl-58446472bbe36cd9f2f074cfe5bea21a3f98d28e.tar.bz2 |
merge 8.7
-rw-r--r-- | generic/tclBasic.c | 3 | ||||
-rw-r--r-- | generic/tclExecute.c | 2 | ||||
-rw-r--r-- | generic/tclNamesp.c | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 669b1ca..1dbd90b 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -9029,6 +9029,7 @@ TclNRYieldToObjCmd( */ iPtr->execEnvPtr = corPtr->callerEEPtr; + /* Not calling Tcl_IncrRefCount(listPtr) here because listPtr is private */ TclSetTailcall(interp, listPtr); corPtr->yieldPtr = listPtr; iPtr->execEnvPtr = corPtr->eePtr; @@ -9231,8 +9232,8 @@ TclNRCoroutineActivateCallback( if (corPtr->yieldPtr) { for (runPtr = TOP_CB(interp); runPtr; runPtr = runPtr->nextPtr) { if (runPtr->data[1] == corPtr->yieldPtr) { + Tcl_DecrRefCount((Tcl_Obj *)runPtr->data[1]); runPtr->data[1] = NULL; - Tcl_DecrRefCount(corPtr->yieldPtr); corPtr->yieldPtr = NULL; break; } diff --git a/generic/tclExecute.c b/generic/tclExecute.c index ee9a4ce..1e23517 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -2447,8 +2447,8 @@ TEBCresume( * 'yieldParameter'). */ - Tcl_IncrRefCount(valuePtr); iPtr->execEnvPtr = corPtr->callerEEPtr; + Tcl_IncrRefCount(valuePtr); TclSetTailcall(interp, valuePtr); corPtr->yieldPtr = valuePtr; iPtr->execEnvPtr = corPtr->eePtr; diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 1882e0a..65e2a77 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -417,6 +417,8 @@ Tcl_PopCallFrame( framePtr->nsPtr = NULL; if (framePtr->tailcallPtr) { + /* Reusing the existing reference count from framePtr->tailcallPtr, so + * no need to Tcl_IncrRefCount(framePtr->tailcallPtr)*/ TclSetTailcall(interp, framePtr->tailcallPtr); } } |