summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbch <brad.harder@gmail.com>2015-02-07 21:19:05 (GMT)
committerbch <brad.harder@gmail.com>2015-02-07 21:19:05 (GMT)
commit0184284dd608ec5b462e9cf9fb64df29814b3695 (patch)
treeeabd4ccfeeb965f841d5d299cad261cd2ce932bb
parent1dcecc86911575eedfda9caede53f086bbbf0ad4 (diff)
downloadtcl-0184284dd608ec5b462e9cf9fb64df29814b3695.zip
tcl-0184284dd608ec5b462e9cf9fb64df29814b3695.tar.gz
tcl-0184284dd608ec5b462e9cf9fb64df29814b3695.tar.bz2
switch raw assert() to Tcl_Panic() per discussion w/ dkf
-rw-r--r--generic/tclIO.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 025708b..702e2a0 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -1548,13 +1548,23 @@ Tcl_CreateChannel(
*/
assert(sizeof(Tcl_ChannelTypeVersion) == sizeof(Tcl_DriverBlockModeProc *));
- assert(NULL!=typePtr->closeProc);
- assert(NULL!=typePtr->inputProc);
- assert(NULL!=typePtr->outputProc);
- assert(NULL!=typePtr->watchProc);
- assert(NULL!=typePtr->getHandleProc);
- if (NULL!=typePtr->wideSeekProc) {
- assert(NULL!=typePtr->seekProc && "Must define seekProc if defining wideSeekProc");
+ if (NULL == typePtr->closeProc)
+ Tcl_Panic("Required closeProc is unset.");
+
+ if (NULL == typePtr->inputProc)
+ Tcl_Panic("Required inputProc is unset.");
+
+ if (NULL == typePtr->outputProc)
+ Tcl_Panic("Required outputProc is unset.");
+
+ if (NULL == typePtr->watchProc)
+ Tcl_Panic("Required watchProc is unset.");
+
+ if (NULL == typePtr->getHandleProc)
+ Tcl_Panic("Required getHandleProc is unset.");
+
+ if ((NULL!=typePtr->wideSeekProc) && (NULL == typePtr->seekProc)) {
+ Tcl_Panic("Must define seekProc if defining wideSeekProc");
}
/*