diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-02-13 22:24:07 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-02-13 22:24:07 (GMT) |
commit | 3929a73ee0fd5945e8f186f495229f3dc98877de (patch) | |
tree | 9580f689ca4e85163b41575852834d678e84824c /generic/tclIORTrans.c | |
parent | 55704171415295ccf24dc89ec02755b78f05830a (diff) | |
parent | 30c32418f67d6455d36bfeb1b8b4539ca5f23771 (diff) | |
download | tcl-3929a73ee0fd5945e8f186f495229f3dc98877de.zip tcl-3929a73ee0fd5945e8f186f495229f3dc98877de.tar.gz tcl-3929a73ee0fd5945e8f186f495229f3dc98877de.tar.bz2 |
Merge trunk
Diffstat (limited to 'generic/tclIORTrans.c')
-rw-r--r-- | generic/tclIORTrans.c | 38 |
1 files changed, 3 insertions, 35 deletions
diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index 5fbd511..ec18767 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -27,10 +27,6 @@ #define EOK 0 #endif -/* DUPLICATE of HaveVersion() in tclIO.c // TODO - MODULE_SCOPE */ -static int HaveVersion(const Tcl_ChannelType *typePtr, - Tcl_ChannelTypeVersion minimumVersion); - /* * Signatures of all functions used in the C layer of the reflection. */ @@ -1386,15 +1382,14 @@ ReflectSeekWide( * non-NULL... */ - if (HaveVersion(parent->typePtr, TCL_CHANNEL_VERSION_3) && - parent->typePtr->wideSeekProc != NULL) { - curPos = parent->typePtr->wideSeekProc(parent->instanceData, offset, + if (Tcl_ChannelWideSeekProc(parent->typePtr) != NULL) { + curPos = Tcl_ChannelWideSeekProc(parent->typePtr)(parent->instanceData, offset, seekMode, errorCodePtr); } else if (offset < LONG_MIN || offset > LONG_MAX) { *errorCodePtr = EOVERFLOW; curPos = -1; } else { - curPos = parent->typePtr->seekProc( + curPos = Tcl_ChannelSeekProc(parent->typePtr)( parent->instanceData, offset, seekMode, errorCodePtr); } @@ -3390,33 +3385,6 @@ TransformLimit( return 1; } -/* DUPLICATE of HaveVersion() in tclIO.c - *---------------------------------------------------------------------- - * - * HaveVersion -- - * - * Return whether a channel type is (at least) of a given version. - * - * Results: - * True if the minimum version is exceeded by the version actually - * present. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -static int -HaveVersion( - const Tcl_ChannelType *chanTypePtr, - Tcl_ChannelTypeVersion minimumVersion) -{ - Tcl_ChannelTypeVersion actualVersion = Tcl_ChannelVersion(chanTypePtr); - - return PTR2INT(actualVersion) >= PTR2INT(minimumVersion); -} - /* * Local Variables: * mode: c |