summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-03-20 17:53:07 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-03-20 17:53:07 (GMT)
commit5e00bffa49c109621360b8e8428cacc4162987aa (patch)
treee6c13b21740a4f1caa328d978e8993121e733b0c /generic/tclIO.c
parent43d2997b0299865b6faa6c49f0dcb7a51f340d70 (diff)
downloadtcl-5e00bffa49c109621360b8e8428cacc4162987aa.zip
tcl-5e00bffa49c109621360b8e8428cacc4162987aa.tar.gz
tcl-5e00bffa49c109621360b8e8428cacc4162987aa.tar.bz2
* generic/tclIO.c (CopyData): Allow the total number of bytes copied
by [fcopy] to exceed 2GB. Can happen when no -size parameter given.
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 1c3ba79..ebbb3d1 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.137.2.16 2010/01/18 22:20:56 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclIO.c,v 1.137.2.17 2010/03/20 17:53:07 dkf Exp $
*/
#include "tclInt.h"
@@ -8605,7 +8605,8 @@ CopyData(
Tcl_Obj *cmdPtr, *errObj = NULL, *bufObj = NULL, *msg = NULL;
Tcl_Channel inChan, outChan;
ChannelState *inStatePtr, *outStatePtr;
- int result = TCL_OK, size, total, sizeb;
+ int result = TCL_OK, size, sizeb;
+ Tcl_WideInt total;
char *buffer;
int inBinary, outBinary, sameEncoding;
/* Encoding control */
@@ -8863,7 +8864,7 @@ CopyData(
StopCopy(csPtr);
Tcl_Preserve(interp);
- Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewIntObj(total));
+ Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewWideIntObj(total));
if (errObj) {
Tcl_ListObjAppendElement(interp, cmdPtr, errObj);
}
@@ -8882,7 +8883,7 @@ CopyData(
result = TCL_ERROR;
} else {
Tcl_ResetResult(interp);
- Tcl_SetObjResult(interp, Tcl_NewIntObj(total));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(total));
}
}
}