summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorbch <brad.harder@gmail.com>2015-01-20 23:40:23 (GMT)
committerbch <brad.harder@gmail.com>2015-01-20 23:40:23 (GMT)
commit52d37c087d8566c82644d7b61a6dac58999a16a7 (patch)
tree5f53dc07954f5bdd7972a72da393236ede18c46c /generic
parent5e6453d592841026aecd2a8e26a087e6f690c3dd (diff)
downloadtcl-52d37c087d8566c82644d7b61a6dac58999a16a7.zip
tcl-52d37c087d8566c82644d7b61a6dac58999a16a7.tar.gz
tcl-52d37c087d8566c82644d7b61a6dac58999a16a7.tar.bz2
assert() on missing definitions for Tcl_ChannelCreate() required struct Tcl_ChannelType{} fields.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclIO.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index a9091af..596ba3f 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -1548,6 +1548,15 @@ 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->truncateProc);
+ assert(NULL!=typePtr->getHandleProc);
+ if (NULL!=typePtr->wideSeekProc) {
+ assert(NULL!=typePtr->seekProc && "Must define seekProc if defining wideSeekProc");
+ }
/*
* JH: We could subsequently memset these to 0 to avoid the numerous