[New-bugs-announce] [issue1202] zlib.crc32() and adler32() return value

Armin Rigo report at bugs.python.org
Tue Sep 25 13:31:11 CEST 2007

New submission from Armin Rigo:

The functions zlib.crc32() and zlib.adler32() return a signed value
in the range(-2147483648, 2147483648) on 32-bit platforms, but an
unsigned value in the range(0, 4294967296) on 64-bit platforms.  This
means that half the possible answers are numerically different on these
two kinds of platforms.

Ideally, this should be fixed by having them always return unsigned
numbers (their C return type is unsigned too).  It's unclear if we can
do this without breaking existing code, though :-(

components: Extension Modules
messages: 56130
nosy: arigo
severity: normal
status: open
title: zlib.crc32() and adler32() return value
type: behavior

Tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list