From e7ae31d6d3e1a343991401b5795fc1b04c6e8236 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 4 Mar 2009 17:52:34 +0000 Subject: Related corrections --- ChangeLog | 1 + generic/tclZlib.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9ebfbbe..19582a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * generic/tclZlib.c (TclZlibCmd): Checksums are defined to be unsigned 32-bit integers, use Tcl_WideInt to pass to scripts. [Bug 2662434] + (ZlibStreamCmd, ChanGetOption): A few other related corrections. 2009-02-27 Jan Nijtmans diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 968c0ed..7bac35a 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.25 2009/03/04 17:26:23 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.26 2009/03/04 17:52:34 dkf Exp $ */ #include "tclInt.h" @@ -2264,7 +2264,7 @@ ZlibStreamCmd( Tcl_WrongNumArgs(interp, 2, objv, NULL); return TCL_ERROR; } - Tcl_SetIntObj(obj, Tcl_ZlibStreamChecksum(zstream)); + Tcl_SetWideIntObj(obj, (Tcl_WideInt) Tcl_ZlibStreamChecksum(zstream)); return TCL_OK; case zs_reset: /* $strm reset */ if (objc != 2) { @@ -2529,7 +2529,7 @@ ChanGetOption( crc = cd->inStream.adler; } - sprintf(buf, "0x%lx", crc); + sprintf(buf, "%lu", crc); if (optionName == NULL) { Tcl_DStringAppendElement(dsPtr, "-checksum"); Tcl_DStringAppendElement(dsPtr, buf); @@ -2838,7 +2838,7 @@ Tcl_ZlibStreamEof( } int -Tcl_ZlibStreamAdler32( +Tcl_ZlibStreamChecksum( Tcl_ZlibStream zshandle) { return 0; -- cgit v0.12