summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-07-02 12:29:43 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-07-02 12:29:43 (GMT)
commit9aa3e851043909a88856222ed97da6ed018a9bbe (patch)
tree8cf83434ed090e640a4b2611e0ebbdd9314b04d3 /generic/tclIO.c
parentfb6b7a8d8df44ad9dc0d96bddf6acfed423fa873 (diff)
downloadtcl-9aa3e851043909a88856222ed97da6ed018a9bbe.zip
tcl-9aa3e851043909a88856222ed97da6ed018a9bbe.tar.gz
tcl-9aa3e851043909a88856222ed97da6ed018a9bbe.tar.bz2
Revert some refcount changes on I/O structs.
These are refcounts on structs, not Tcl_Obj's. Their scheme doesn't suffer the same difficulties and histories as Tcl_Obj's, and they need not copy every detail, appropriate or not, from Tcl_Obj refcount management. The "significant value" -- as dkf puts it -- for the struct refcounting scheme is 0 not 1.
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 eb924d1..8b2e149 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -1930,7 +1930,7 @@ TclChannelRelease(
if (chanPtr->refCount == 0) {
Tcl_Panic("Channel released more than preserved");
}
- if (chanPtr->refCount-- > 1) {
+ if (--chanPtr->refCount) {
return;
}
if (chanPtr->typePtr == NULL) {
@@ -2426,7 +2426,7 @@ static void
ReleaseChannelBuffer(
ChannelBuffer *bufPtr)
{
- if (bufPtr->refCount-- > 1) {
+ if (--bufPtr->refCount) {
return;
}
ckfree(bufPtr);