summaryrefslogtreecommitdiffstats
path: root/generic/tclProc.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2015-06-30 21:41:18 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2015-06-30 21:41:18 (GMT)
commit73484694b551e1a1332066df5c5e11065e308c21 (patch)
treed4a008c1cca0c1d8fb3f5fc7c741217ebb7534be /generic/tclProc.c
parent6af49e65ad4e40ab1d8f93821728698b1af3f58b (diff)
downloadtcl-73484694b551e1a1332066df5c5e11065e308c21.zip
tcl-73484694b551e1a1332066df5c5e11065e308c21.tar.gz
tcl-73484694b551e1a1332066df5c5e11065e308c21.tar.bz2
Consistancy in refcount management.
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r--generic/tclProc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c
index 6ffbd90..2679bf1 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -1842,7 +1842,7 @@ InterpProcNR2(
TCL_DTRACE_PROC_RETURN(l < iPtr->varFramePtr->objc ?
TclGetString(iPtr->varFramePtr->objv[l]) : NULL, result);
}
- if (--procPtr->refCount <= 0) {
+ if (procPtr->refCount-- <= 1) {
TclProcCleanupProc(procPtr);
}
@@ -2403,7 +2403,7 @@ ProcBodyFree(
{
Proc *procPtr = objPtr->internalRep.twoPtrValue.ptr1;
- if (procPtr->refCount-- < 2) {
+ if (procPtr->refCount-- <= 1) {
TclProcCleanupProc(procPtr);
}
}
@@ -2446,7 +2446,7 @@ FreeLambdaInternalRep(
Proc *procPtr = objPtr->internalRep.twoPtrValue.ptr1;
Tcl_Obj *nsObjPtr = objPtr->internalRep.twoPtrValue.ptr2;
- if (procPtr->refCount-- == 1) {
+ if (procPtr->refCount-- <= 1) {
TclProcCleanupProc(procPtr);
}
TclDecrRefCount(nsObjPtr);