summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2008-03-17 18:48:05 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2008-03-17 18:48:05 (GMT)
commitf48f9d38c02ef914194eeeeb6cdae770e218af00 (patch)
tree66b91bf167ab2d565d9da953376e038b3380796b /Doc
parent33451d8ab143fb89374673d3aa751910c5b1031e (diff)
downloadcpython-f48f9d38c02ef914194eeeeb6cdae770e218af00.zip
cpython-f48f9d38c02ef914194eeeeb6cdae770e218af00.tar.gz
cpython-f48f9d38c02ef914194eeeeb6cdae770e218af00.tar.bz2
Force zlib.crc32 and zlib.adler32 to return a signed integer on all platforms
regardless of the native sizeof(long) used in the integer object. This somewhat odd behavior of returning a signed is maintained in 2.x for compatibility reasons of always returning an integer rather than a long object. Fixes Issue1202 for Python 2.6
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/zlib.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/library/zlib.rst b/Doc/library/zlib.rst
index 94e429e..b522fe6 100644
--- a/Doc/library/zlib.rst
+++ b/Doc/library/zlib.rst
@@ -42,6 +42,12 @@ The available exception and functions in this module are:
the algorithm is designed for use as a checksum algorithm, it is not suitable
for use as a general hash algorithm.
+ This function always returns an integer object.
+
+.. versionchanged:: 2.6
+ For consistent cross-platform behavior we always return a signed integer.
+ ie: Results in the (2**31)...(2**32-1) range will be negative.
+
.. function:: compress(string[, level])
@@ -74,6 +80,12 @@ The available exception and functions in this module are:
the algorithm is designed for use as a checksum algorithm, it is not suitable
for use as a general hash algorithm.
+ This function always returns an integer object.
+
+.. versionchanged:: 2.6
+ For consistent cross-platform behavior we always return a signed integer.
+ ie: Results in the (2**31)...(2**32-1) range will be negative.
+
.. function:: decompress(string[, wbits[, bufsize]])