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)
commitb76f99d88cfd6cdea343c568d4fd720fe23cd76a (patch)
treeee2efcea8f264bb7f30b3e613773adb9c51cfba2 /generic/tclIO.c
parentf256ed021d99bae8aba1ef9b86f347f91d5e6574 (diff)
downloadtcl-b76f99d88cfd6cdea343c568d4fd720fe23cd76a.zip
tcl-b76f99d88cfd6cdea343c568d4fd720fe23cd76a.tar.gz
tcl-b76f99d88cfd6cdea343c568d4fd720fe23cd76a.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);