diff options
author | dgp <dgp@users.sourceforge.net> | 2014-02-21 15:12:16 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-02-21 15:12:16 (GMT) |
commit | 527d583d939f70450bc8b3db5077dd7d806c7c3e (patch) | |
tree | e65cb2eed563763333cdcb96fde99fe90faac544 /generic/tclIO.c | |
parent | 82eaf13ae6136c9679b5aeba5c75cd777f2829dd (diff) | |
download | tcl-527d583d939f70450bc8b3db5077dd7d806c7c3e.zip tcl-527d583d939f70450bc8b3db5077dd7d806c7c3e.tar.gz tcl-527d583d939f70450bc8b3db5077dd7d806c7c3e.tar.bz2 |
Simplify ReadBytes based on new constraints.dgp_experiment
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r-- | generic/tclIO.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index ac28ec0..23e1fbf 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -5242,6 +5242,10 @@ ReadBytes( } dst += offset; +#if 1 + memcpy(dst, src, (size_t) toRead); + srcRead = dstWrote = toRead; +#else if (statePtr->flags & INPUT_NEED_NL) { ResetFlag(statePtr, INPUT_NEED_NL); if ((srcLen == 0) || (*src != '\n')) { @@ -5262,6 +5266,7 @@ ReadBytes( return -1; } } +#endif bufPtr->nextRemoved += srcRead; *offsetPtr += dstWrote; return dstWrote; |