summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-12-27 10:07:05 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-12-27 10:07:05 (GMT)
commita7e88f6d17b8ff68c0cb6f10840445088d5264f0 (patch)
tree895153a2581a2a0e2dc1672a972732d1f2efc3f4 /generic
parent1ea51e1fb6fb072c84c166e0831423b0c323558b (diff)
downloadtcl-a7e88f6d17b8ff68c0cb6f10840445088d5264f0.zip
tcl-a7e88f6d17b8ff68c0cb6f10840445088d5264f0.tar.gz
tcl-a7e88f6d17b8ff68c0cb6f10840445088d5264f0.tar.bz2
Fix my silly blunders. [Bug 2470237]
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.decls8
-rw-r--r--generic/tclDecls.h12
-rw-r--r--generic/tclZlib.c16
3 files changed, 18 insertions, 18 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls
index dff3242..a9a5bcf 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -12,7 +12,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: tcl.decls,v 1.166 2008/12/27 00:04:17 dkf Exp $
+# RCS: @(#) $Id: tcl.decls,v 1.167 2008/12/27 10:07:06 dkf Exp $
library tcl
@@ -2249,10 +2249,12 @@ declare 611 generic {
int buffersize, Tcl_Obj *gzipHeaderDictObj)
}
declare 612 generic {
- unsigned int Tcl_ZlibCRC32(unsigned int crc, const char *buf, int len)
+ unsigned int Tcl_ZlibCRC32(unsigned int crc, const unsigned char *buf,
+ int len)
}
declare 613 generic {
- unsigned int Tcl_ZlibAdler32(unsigned int adler, const char *buf, int len)
+ unsigned int Tcl_ZlibAdler32(unsigned int adler, const unsigned char *buf,
+ int len)
}
declare 614 generic {
int Tcl_ZlibStreamInit(Tcl_Interp *interp, int mode, int format,
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 74284ed..a680700 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclDecls.h,v 1.167 2008/12/27 00:04:17 dkf Exp $
+ * RCS: @(#) $Id: tclDecls.h,v 1.168 2008/12/27 10:07:06 dkf Exp $
*/
#ifndef _TCLDECLS
@@ -3704,14 +3704,14 @@ EXTERN int Tcl_ZlibInflate (Tcl_Interp * interp, int format,
#ifndef Tcl_ZlibCRC32_TCL_DECLARED
#define Tcl_ZlibCRC32_TCL_DECLARED
/* 612 */
-EXTERN unsigned int Tcl_ZlibCRC32 (unsigned int crc, const char * buf,
- int len);
+EXTERN unsigned int Tcl_ZlibCRC32 (unsigned int crc,
+ const unsigned char * buf, int len);
#endif
#ifndef Tcl_ZlibAdler32_TCL_DECLARED
#define Tcl_ZlibAdler32_TCL_DECLARED
/* 613 */
EXTERN unsigned int Tcl_ZlibAdler32 (unsigned int adler,
- const char * buf, int len);
+ const unsigned char * buf, int len);
#endif
#ifndef Tcl_ZlibStreamInit_TCL_DECLARED
#define Tcl_ZlibStreamInit_TCL_DECLARED
@@ -4446,8 +4446,8 @@ typedef struct TclStubs {
void (*tcl_BackgroundException) (Tcl_Interp * interp, int code); /* 609 */
int (*tcl_ZlibDeflate) (Tcl_Interp * interp, int format, Tcl_Obj * data, int level, Tcl_Obj * gzipHeaderDictObj); /* 610 */
int (*tcl_ZlibInflate) (Tcl_Interp * interp, int format, Tcl_Obj * data, int buffersize, Tcl_Obj * gzipHeaderDictObj); /* 611 */
- unsigned int (*tcl_ZlibCRC32) (unsigned int crc, const char * buf, int len); /* 612 */
- unsigned int (*tcl_ZlibAdler32) (unsigned int adler, const char * buf, int len); /* 613 */
+ unsigned int (*tcl_ZlibCRC32) (unsigned int crc, const unsigned char * buf, int len); /* 612 */
+ unsigned int (*tcl_ZlibAdler32) (unsigned int adler, const unsigned char * buf, int len); /* 613 */
int (*tcl_ZlibStreamInit) (Tcl_Interp * interp, int mode, int format, int level, Tcl_Obj * dictObj, Tcl_ZlibStream * zshandle); /* 614 */
Tcl_Obj * (*tcl_ZlibStreamGetCommandName) (Tcl_ZlibStream zshandle); /* 615 */
int (*tcl_ZlibStreamEof) (Tcl_ZlibStream zshandle); /* 616 */
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index 8db482a..f932525 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.19 2008/12/27 00:04:17 dkf Exp $
+ * RCS: @(#) $Id: tclZlib.c,v 1.20 2008/12/27 10:07:06 dkf Exp $
*/
#include "tclInt.h"
@@ -1612,11 +1612,10 @@ TclZlibCmd(
return TCL_ERROR;
}
if (objc < 4) {
- start = Tcl_ZlibAdler32(0, 0, 0);
+ start = Tcl_ZlibAdler32(0, NULL, 0);
}
data = Tcl_GetByteArrayFromObj(objv[2], &dlen);
- Tcl_SetIntObj(obj, (int)
- Tcl_ZlibAdler32(start, (const char *) data, dlen));
+ Tcl_SetIntObj(obj, (int) Tcl_ZlibAdler32(start, data, dlen));
return TCL_OK;
case z_crc32: /* crc32 str ?startvalue?
* -> checksum */
@@ -1629,11 +1628,10 @@ TclZlibCmd(
return TCL_ERROR;
}
if (objc < 4) {
- start = Tcl_ZlibCRC32(0, 0, 0);
+ start = Tcl_ZlibCRC32(0, NULL, 0);
}
- data = Tcl_GetByteArrayFromObj(objv[2],&dlen);
- Tcl_SetIntObj(obj, (int)
- Tcl_ZlibCRC32(start, (const char *) data, dlen));
+ data = Tcl_GetByteArrayFromObj(objv[2], &dlen);
+ Tcl_SetIntObj(obj, (int) Tcl_ZlibCRC32(start, data, dlen));
return TCL_OK;
case z_deflate: /* deflate data ?level?
* -> rawCompressedData */
@@ -2187,7 +2185,7 @@ ZlibStreamCmd(
Tcl_WrongNumArgs(interp, 2, objv, NULL);
return TCL_ERROR;
}
- Tcl_SetIntObj(obj, Tcl_ZlibStreamAdler32(zstream));
+ Tcl_SetIntObj(obj, Tcl_ZlibStreamChecksum(zstream));
return TCL_OK;
case zs_reset: /* $strm reset */
if (objc != 2) {