diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-06-30 21:41:18 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-06-30 21:41:18 (GMT) |
commit | 73484694b551e1a1332066df5c5e11065e308c21 (patch) | |
tree | d4a008c1cca0c1d8fb3f5fc7c741217ebb7534be /generic/tclObj.c | |
parent | 6af49e65ad4e40ab1d8f93821728698b1af3f58b (diff) | |
download | tcl-73484694b551e1a1332066df5c5e11065e308c21.zip tcl-73484694b551e1a1332066df5c5e11065e308c21.tar.gz tcl-73484694b551e1a1332066df5c5e11065e308c21.tar.bz2 |
Consistancy in refcount management.
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r-- | generic/tclObj.c | 6 |
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 { |