diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-12-23 15:43:42 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-12-23 15:43:42 (GMT) |
commit | b76f99d88cfd6cdea343c568d4fd720fe23cd76a (patch) | |
tree | ee2efcea8f264bb7f30b3e613773adb9c51cfba2 /generic/tclIO.c | |
parent | f256ed021d99bae8aba1ef9b86f347f91d5e6574 (diff) | |
download | tcl-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.c | 4 |
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); |