summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-06-25 19:43:05 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-06-25 19:43:05 (GMT)
commit95657cdd40dace0a8f62c50b3f0991b4ec9972fd (patch)
treebf466a0cc516e0292442c5db35c8e6c9fc92790a /Modules
parent696c35e86bffea1f2bc6179a29e46416899e3de6 (diff)
downloadcpython-95657cdd40dace0a8f62c50b3f0991b4ec9972fd.zip
cpython-95657cdd40dace0a8f62c50b3f0991b4ec9972fd.tar.gz
cpython-95657cdd40dace0a8f62c50b3f0991b4ec9972fd.tar.bz2
Issue #26243: Only the level argument to zlib.compress() is keyword argument
now. The first argument is positional-only.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/clinic/zlibmodule.c.h6
-rw-r--r--Modules/zlibmodule.c3
2 files changed, 5 insertions, 4 deletions
diff --git a/Modules/clinic/zlibmodule.c.h b/Modules/clinic/zlibmodule.c.h
index c657bcb..dcaeef8 100644
--- a/Modules/clinic/zlibmodule.c.h
+++ b/Modules/clinic/zlibmodule.c.h
@@ -3,7 +3,7 @@ preserve
[clinic start generated code]*/
PyDoc_STRVAR(zlib_compress__doc__,
-"compress($module, /, data, level=Z_DEFAULT_COMPRESSION)\n"
+"compress($module, data, /, level=Z_DEFAULT_COMPRESSION)\n"
"--\n"
"\n"
"Returns a bytes object containing compressed data.\n"
@@ -23,7 +23,7 @@ static PyObject *
zlib_compress(PyModuleDef *module, PyObject *args, PyObject *kwargs)
{
PyObject *return_value = NULL;
- static char *_keywords[] = {"data", "level", NULL};
+ static char *_keywords[] = {"", "level", NULL};
Py_buffer data = {NULL, NULL};
int level = Z_DEFAULT_COMPRESSION;
@@ -460,4 +460,4 @@ exit:
#ifndef ZLIB_COMPRESS_COPY_METHODDEF
#define ZLIB_COMPRESS_COPY_METHODDEF
#endif /* !defined(ZLIB_COMPRESS_COPY_METHODDEF) */
-/*[clinic end generated code: output=9bd8a093baa653b2 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=ba904dec30cc1a1a input=a9049054013a1b77]*/
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c
index ad6f28d..3a459a5 100644
--- a/Modules/zlibmodule.c
+++ b/Modules/zlibmodule.c
@@ -143,6 +143,7 @@ zlib.compress
data: Py_buffer
Binary data to be compressed.
+ /
level: int(c_default="Z_DEFAULT_COMPRESSION") = Z_DEFAULT_COMPRESSION
Compression level, in 0-9 or -1.
@@ -151,7 +152,7 @@ Returns a bytes object containing compressed data.
static PyObject *
zlib_compress_impl(PyModuleDef *module, Py_buffer *data, int level)
-/*[clinic end generated code: output=1b97589132b203b4 input=abed30f4fa14e213]*/
+/*[clinic end generated code: output=1b97589132b203b4 input=638d54b6315dbed3]*/
{
PyObject *ReturnVal = NULL;
Byte *input, *output = NULL;