From 884bdbb9401fca546ba8dd20b4d713fd8897840d Mon Sep 17 00:00:00 2001 From: bch Date: Sun, 8 Feb 2015 05:04:33 +0000 Subject: inputProc and outputProc tests run conditionally on TCL_READABLE, TCL_WRITABLE mask --- generic/tclIO.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclIO.c b/generic/tclIO.c index 702e2a0..0ba864a 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -1551,10 +1551,10 @@ Tcl_CreateChannel( if (NULL == typePtr->closeProc) Tcl_Panic("Required closeProc is unset."); - if (NULL == typePtr->inputProc) + if ((TCL_READABLE & mask) && (NULL == typePtr->inputProc)) Tcl_Panic("Required inputProc is unset."); - if (NULL == typePtr->outputProc) + if ((TCL_WRITABLE & mask) && (NULL == typePtr->outputProc)) Tcl_Panic("Required outputProc is unset."); if (NULL == typePtr->watchProc) -- cgit v0.12