diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-07-23 03:39:49 +0000 |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-07-23 03:39:49 +0000 |
commit | 248d7010cdb4bc70d9c37e48ce97ebda18d84873 (patch) | |
tree | 235c71ee18e604977ba1494f52ecc57ceb2c4ed3 /Modules/zlibmodule.c | |
parent | f880f92251259cee5337413e88faa450887ae84e (diff) | |
parent | f81de5e1946bcc07b86bac16f51ac0b4d0208da6 (diff) | |
download | cpython-248d7010cdb4bc70d9c37e48ce97ebda18d84873.tar.gz |
Issue #27130: Merge zlib 64-bit fixes from 3.5
Diffstat (limited to 'Modules/zlibmodule.c')
-rw-r--r-- | Modules/zlibmodule.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c index fccb6163e8..491bc8551c 100644 --- a/Modules/zlibmodule.c +++ b/Modules/zlibmodule.c @@ -57,7 +57,7 @@ typedef struct } compobject; static void -zlib_error(z_stream zst, int err, char *msg) +zlib_error(z_stream zst, int err, const char *msg) { const char *zmsg = Z_NULL; /* In case of a version mismatch, zst.msg won't be initialized. @@ -199,18 +199,18 @@ arrange_output_buffer(z_stream *zst, PyObject **buffer, Py_ssize_t length) /*[clinic input] zlib.compress - bytes: Py_buffer + data: Py_buffer Binary data to be compressed. - level: int(c_default="Z_DEFAULT_COMPRESSION") = Z_DEFAULT_COMPRESSION - Compression level, in 0-9. / + level: int(c_default="Z_DEFAULT_COMPRESSION") = Z_DEFAULT_COMPRESSION + Compression level, in 0-9 or -1. Returns a bytes object containing compressed data. [clinic start generated code]*/ static PyObject * -zlib_compress_impl(PyObject *module, Py_buffer *bytes, int level) -/*[clinic end generated code: output=ae64c2c3076321a0 input=be3abe9934bda4b3]*/ +zlib_compress_impl(PyObject *module, Py_buffer *data, int level) +/*[clinic end generated code: output=d80906d73f6294c8 input=638d54b6315dbed3]*/ { PyObject *RetVal = NULL; Byte *ibuf; @@ -218,8 +218,8 @@ zlib_compress_impl(PyObject *module, Py_buffer *bytes, int level) int err, flush; z_stream zst; - ibuf = bytes->buf; - ibuflen = bytes->len; + ibuf = data->buf; + ibuflen = data->len; zst.opaque = NULL; zst.zalloc = PyZlib_Malloc; @@ -1333,7 +1333,7 @@ PyDoc_STRVAR(zlib_module_documentation, "zlib library, which is based on GNU zip.\n" "\n" "adler32(string[, start]) -- Compute an Adler-32 checksum.\n" -"compress(string[, level]) -- Compress string, with compression level in 0-9.\n" +"compress(data[, level]) -- Compress data, with compression level 0-9 or -1.\n" "compressobj([level[, ...]]) -- Return a compressor object.\n" "crc32(string[, start]) -- Compute a CRC-32 checksum.\n" "decompress(string,[wbits],[bufsize]) -- Decompresses a compressed string.\n" |