summaryrefslogtreecommitdiffstats
path: root/generic/tclZlib.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-04-01 19:36:20 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-04-01 19:36:20 (GMT)
commit384b9de6bb83732c6055c5d1a880898399579ecf (patch)
tree895690fb22a220b462022f58e5c7e108ab735db3 /generic/tclZlib.c
parentfef5802d1e2be2aa2c62dbf5fb7c8a47cdc3b48c (diff)
downloadtcl-384b9de6bb83732c6055c5d1a880898399579ecf.zip
tcl-384b9de6bb83732c6055c5d1a880898399579ecf.tar.gz
tcl-384b9de6bb83732c6055c5d1a880898399579ecf.tar.bz2
Modify testbytestring such that is only produces pure byte-arrays, if not it errors out.
Modify Tcl_NewIntObj/Tcl_NewBooleanObj -> Tcl_NewWideIntObj. Less references to "long" datatype.
Diffstat (limited to 'generic/tclZlib.c')
-rw-r--r--generic/tclZlib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index 32268af..5a7abec 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -422,6 +422,7 @@ GenerateHeader(
{
Tcl_Obj *value;
int len, result = TCL_ERROR;
+ Tcl_WideInt wideValue;
const char *valueStr;
Tcl_Encoding latin1enc;
static const char *const types[] = {
@@ -485,10 +486,11 @@ GenerateHeader(
if (GetValue(interp, dictObj, "time", &value) != TCL_OK) {
goto error;
- } else if (value != NULL && Tcl_GetLongFromObj(interp, value,
- (long *) &headerPtr->header.time) != TCL_OK) {
+ } else if (value != NULL && Tcl_GetWideIntFromObj(interp, value,
+ &wideValue) != TCL_OK) {
goto error;
}
+ headerPtr->header.time = wideValue;
if (GetValue(interp, dictObj, "type", &value) != TCL_OK) {
goto error;