summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-11-21 10:15:24 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-11-21 10:15:24 (GMT)
commita3271d4360790d34a08896e46f0a6a37aa344568 (patch)
tree1745e8e5096f20504655ab8f994412fe58f8eb56 /generic/tclObj.c
parent0f3bab8aece13cfd66cca4d2e16489faaf69457b (diff)
downloadtcl-a3271d4360790d34a08896e46f0a6a37aa344568.zip
tcl-a3271d4360790d34a08896e46f0a6a37aa344568.tar.gz
tcl-a3271d4360790d34a08896e46f0a6a37aa344568.tar.bz2
More internal use of size_t in stead of int.
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 6c850af..416e5ed 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -361,7 +361,7 @@ typedef struct ResolvedCmdName {
* incremented; if so, the cmd was renamed,
* deleted, hidden, or exposed, and so the
* pointer is invalid. */
- int refCount; /* Reference count: 1 for each cmdName object
+ size_t refCount; /* Reference count: 1 for each cmdName object
* that has a pointer to this ResolvedCmdName
* structure as its internal rep. This
* structure can be freed when refCount
@@ -4307,7 +4307,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
@@ -4419,7 +4419,7 @@ SetCmdNameFromAny(
Command *oldCmdPtr = resPtr->cmdPtr;
- if (--oldCmdPtr->refCount == 0) {
+ if (oldCmdPtr->refCount-- <= 1) {
TclCleanupCommandMacro(oldCmdPtr);
}
} else {