summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.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)
commit27ce2290a6e107aa7e2b8a5995fa32e32106546c (patch)
treed4a008c1cca0c1d8fb3f5fc7c741217ebb7534be /generic/tclObj.c
parentc2ea0fbc1bd362371328c20f5408e45ec4f7770c (diff)
downloadtcl-27ce2290a6e107aa7e2b8a5995fa32e32106546c.zip
tcl-27ce2290a6e107aa7e2b8a5995fa32e32106546c.tar.gz
tcl-27ce2290a6e107aa7e2b8a5995fa32e32106546c.tar.bz2
Consistancy in refcount management.
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r--generic/tclObj.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 80a3e31..15d874f 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -3803,7 +3803,7 @@ Tcl_DbDecrRefCount(
# endif /* TCL_THREADS */
#endif /* TCL_MEM_DEBUG */
- if (--(objPtr)->refCount <= 0) {
+ if (objPtr->refCount-- <= 1) {
TclFreeObj(objPtr);
}
}
@@ -4288,7 +4288,7 @@ FreeCmdNameInternalRep(
* there are no more uses, free the ResolvedCmdName structure.
*/
- if (resPtr->refCount-- == 1) {
+ if (resPtr->refCount-- <= 1) {
/*
* Now free the cached command, unless it is still in its hash
* table or if there are other references to it from other cmdName
@@ -4404,7 +4404,7 @@ SetCmdNameFromAny(
Command *oldCmdPtr = resPtr->cmdPtr;
- if (--oldCmdPtr->refCount == 0) {
+ if (oldCmdPtr->refCount-- <= 1) {
TclCleanupCommandMacro(oldCmdPtr);
}
} else {