[Python-checkins] r61779 - python/trunk/Modules/zlibmodule.c
Neal Norwitz
nnorwitz at gmail.com
Sun Mar 23 06:53:48 CET 2008
Greg,
Can you take a look at this? This change gets test_tarfile to pass on
the Alpha, but causes test_zlib to fail. I'm not sure how to fix them
all correctly.
Thanks,
n
On Sat, Mar 22, 2008 at 10:08 PM, neal.norwitz
<python-checkins at python.org> wrote:
> Author: neal.norwitz
> Date: Sun Mar 23 06:08:37 2008
> New Revision: 61779
>
> Modified:
> python/trunk/Modules/zlibmodule.c
> Log:
> Fix test_tarfile failures on Alpha (Tru64). The problem was caused in r61449
> which made the return value signed. On the Alpha that also lost data
> since sizeof(int) != sizeof(long) and apparently adler32/crc32 return
> 64 bits of data. This change keeps the signedness and continues to store the
> data in a long rather than an int as was the case before r61449.
>
>
> Modified: python/trunk/Modules/zlibmodule.c
> ==============================================================================
> --- python/trunk/Modules/zlibmodule.c (original)
> +++ python/trunk/Modules/zlibmodule.c Sun Mar 23 06:08:37 2008
> @@ -891,7 +891,8 @@
> {
> uLong adler32val = adler32(0L, Z_NULL, 0);
> Byte *buf;
> - int len, signed_val;
> + int len;
> + long signed_val;
>
> if (!PyArg_ParseTuple(args, "s#|k:adler32", &buf, &len, &adler32val))
> return NULL;
> @@ -914,7 +915,8 @@
> {
> uLong crc32val = crc32(0L, Z_NULL, 0);
> Byte *buf;
> - int len, signed_val;
> + int len;
> + long signed_val;
>
> if (!PyArg_ParseTuple(args, "s#|k:crc32", &buf, &len, &crc32val))
> return NULL;
> _______________________________________________
> Python-checkins mailing list
> Python-checkins at python.org
> http://mail.python.org/mailman/listinfo/python-checkins
>
More information about the Python-checkins
mailing list