diff options
author | andreas_kupries <andreas_kupries@noemail.net> | 2001-12-12 22:32:35 (GMT) |
---|---|---|
committer | andreas_kupries <andreas_kupries@noemail.net> | 2001-12-12 22:32:35 (GMT) |
commit | 52a86c87a66d5f7e1e131355f43cb98e33c6163e (patch) | |
tree | cde1cbddbda471b364cd31936971af45b230c077 | |
parent | c48e157ddcaabf542fc5a5b24e0635931a10b28f (diff) | |
download | tcl-52a86c87a66d5f7e1e131355f43cb98e33c6163e.zip tcl-52a86c87a66d5f7e1e131355f43cb98e33c6163e.tar.gz tcl-52a86c87a66d5f7e1e131355f43cb98e33c6163e.tar.bz2 |
* generic/tclIO.c (Tcl_GetsObj): Applied patch for bug #491341 as
provided by Don Porter <dgp@users.sourceforge.net>. Fixes
assumption of having an empty Tcl_Obj to work with.
FossilOrigin-Name: 8c4490b8d507cd761c7fe44b3f8189da8767af0b
-rw-r--r-- | ChangeLog | 20 | ||||
-rw-r--r-- | generic/tclIO.c | 8 |
2 files changed, 17 insertions, 11 deletions
@@ -1,13 +1,19 @@ +2001-12-12 Andreas Kupries <andreas_kupries@users.sourceforge.net> + + * generic/tclIO.c (Tcl_GetsObj): Applied patch for bug #491341 as + provided by Don Porter <dgp@users.sourceforge.net>. Fixes + assumption of having an empty Tcl_Obj to work with. + 2001-12-11 Miguel Sofer <msofer@users.sourceforge.net> * generic/tclCompCmds.c: * generic/tclCompile.c: * generic/tclExecute.c: consistency patch, to make all - instructions that pop a variable number of Tcl_Obj's off the - execution stack take the number of popped objects as first - operand. Modified *only* the new instructions - INST_LIST_INDEX_MULTI and INST_LSET_FLAT, so this has no effect on - bytecodes generated up to tcl8.4a3 inclusive. + instructions that pop a variable number of Tcl_Obj's off the + execution stack take the number of popped objects as first + operand. Modified *only* the new instructions + INST_LIST_INDEX_MULTI and INST_LSET_FLAT, so this has no effect + on bytecodes generated up to tcl8.4a3 inclusive. 2001-12-11 Miguel Sofer <msofer@users.sourceforge.net> @@ -17,8 +23,8 @@ * generic/tclCompCmds.c (TclCompileLindexCmd): * generic/tclCompExpr.c (CompileMathFuncCall): removed the last - two overestimates of the necessary stack depth for bytecodes in - the fix of [Bug 483611]. + two overestimates of the necessary stack depth for bytecodes in + the fix of [Bug 483611]. 2001-12-10 Andreas Kupries <andreas_kupries@users.sourceforge.net> diff --git a/generic/tclIO.c b/generic/tclIO.c index 982d6ff..22f22bc 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.41 2001/11/07 04:47:54 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.42 2001/12/12 22:32:35 andreas_kupries Exp $ */ #include "tclInt.h" @@ -3631,13 +3631,13 @@ Tcl_GetsObj(chan, objPtr) if (statePtr->flags & CHANNEL_EOF) { skip = 0; eol = dstEnd; - if (eol == objPtr->bytes) { + if (eol == objPtr->bytes + oldLength) { /* - * If we didn't produce any bytes before encountering EOF, + * If we didn't append any bytes before encountering EOF, * caller needs to see -1. */ - Tcl_SetObjLength(objPtr, 0); + Tcl_SetObjLength(objPtr, oldLength); CommonGetsCleanup(chanPtr, encoding); copiedTotal = -1; goto done; |