summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
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)
commit8a0f2c19a4874ee97f6e20d202d2b34a69a38e06 (patch)
tree5f53dc07954f5bdd7972a72da393236ede18c46c /generic/tclIO.c
parenta3b402c305bb7a8126ec53b12db5b9a1e6b9e585 (diff)
downloadtcl-8a0f2c19a4874ee97f6e20d202d2b34a69a38e06.zip
tcl-8a0f2c19a4874ee97f6e20d202d2b34a69a38e06.tar.gz
tcl-8a0f2c19a4874ee97f6e20d202d2b34a69a38e06.tar.bz2
assert() on missing definitions for Tcl_ChannelCreate() required struct Tcl_ChannelType{} fields.
Diffstat (limited to 'generic/tclIO.c')
-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