summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
authorstanton <stanton>1998-11-11 04:08:12 (GMT)
committerstanton <stanton>1998-11-11 04:08:12 (GMT)
commit131c68d85079ca5a553b28fef489cf29b79f1176 (patch)
tree7e89676f31bb688b2686f508446e3282e7148a05 /generic/tclIO.c
parent0a41c61107c36da0a8e4ca0fc259149e3bc1956d (diff)
downloadtcl-131c68d85079ca5a553b28fef489cf29b79f1176.zip
tcl-131c68d85079ca5a553b28fef489cf29b79f1176.tar.gz
tcl-131c68d85079ca5a553b28fef489cf29b79f1176.tar.bz2
merged 8.0.4 into 8.1
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 0faffff..42fcf44 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIO.c,v 1.1.2.2 1998/09/24 23:58:51 stanton Exp $
+ * RCS: @(#) $Id: tclIO.c,v 1.1.2.3 1998/11/11 04:08:16 stanton Exp $
*/
#include "tclInt.h"
@@ -5546,13 +5546,10 @@ Tcl_NotifyChannel(channel, mask)
NextChannelHandler nh;
/*
- * Prevent the event handler from deleting the channel by incrementing
- * the channel's ref count. Case in point: ChannelEventScriptInvoker()
- * was evaling a script (owned by the channel) which caused the channel
- * to be closed and then the byte codes no longer existed.
+ * Preserve the channel struct in case the script closes it.
*/
- Tcl_RegisterChannel(NULL, channel);
+ Tcl_Preserve((ClientData) channel);
/*
* If we are flushing in the background, be sure to call FlushChannel
@@ -5600,12 +5597,7 @@ Tcl_NotifyChannel(channel, mask)
UpdateInterest(chanPtr);
}
- /*
- * No longer need to protect the channel from being deleted.
- * After this point it is unsafe to use the value of "channel".
- */
-
- Tcl_UnregisterChannel((Tcl_Interp *) NULL, channel);
+ Tcl_Release((ClientData) channel);
tsdPtr->nestedHandlerPtr = nh.nestedHandlerPtr;
}