summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-12-23 15:43:42 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-12-23 15:43:42 (GMT)
commita04ce08575e6013ffee3376c7d045a6709dee314 (patch)
treeee2efcea8f264bb7f30b3e613773adb9c51cfba2 /generic/tclIO.c
parent753a557ea2976254eafdc0a1711fcf3ec34d0b2d (diff)
downloadtcl-a04ce08575e6013ffee3376c7d045a6709dee314.zip
tcl-a04ce08575e6013ffee3376c7d045a6709dee314.tar.gz
tcl-a04ce08575e6013ffee3376c7d045a6709dee314.tar.bz2
Update -DMSTATS functionality, for possible total memory sizes > 2Gb. One more place where use of size_t can increase range.
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index ffd2430..5c39e19 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -323,7 +323,7 @@ typedef struct ResolvedChanName {
Tcl_Interp *interp; /* The interp in which the lookup was done. */
int epoch; /* The epoch of the channel when the lookup
* was done. Use to verify validity. */
- int refCount; /* Share this struct among many Tcl_Obj. */
+ size_t refCount; /* Share this struct among many Tcl_Obj. */
} ResolvedChanName;
static void DupChannelIntRep(Tcl_Obj *objPtr, Tcl_Obj *copyPtr);
@@ -11194,7 +11194,7 @@ FreeChannelIntRep(
ResolvedChanName *resPtr = objPtr->internalRep.twoPtrValue.ptr1;
objPtr->typePtr = NULL;
- if (--resPtr->refCount) {
+ if (resPtr->refCount-- > 1) {
return;
}
Tcl_Release(resPtr->statePtr);