summaryrefslogtreecommitdiff
path: root/Modules/clinic/_lzmamodule.c.h
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2017-02-02 19:17:51 +0000
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2017-02-02 19:17:51 +0000
commitb8cf82474245d48753ae34b76a272d5120895add (patch)
tree8bec37e99a342ac40fc8a0619897feaad7615061 /Modules/clinic/_lzmamodule.c.h
parent474ecf16ed434144efc0e1de383efda76f011e3f (diff)
parent14593e19e199dd34f268b35987ddb288bf022039 (diff)
downloadcpython-b8cf82474245d48753ae34b76a272d5120895add.tar.gz
Closes #24875: Merged fix from 3.6.
Diffstat (limited to 'Modules/clinic/_lzmamodule.c.h')
-rw-r--r--Modules/clinic/_lzmamodule.c.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/Modules/clinic/_lzmamodule.c.h b/Modules/clinic/_lzmamodule.c.h
index 9e6075954a..a3b1ad5c6c 100644
--- a/Modules/clinic/_lzmamodule.c.h
+++ b/Modules/clinic/_lzmamodule.c.h
@@ -96,7 +96,7 @@ _lzma_LZMADecompressor_decompress(Decompressor *self, PyObject **args, Py_ssize_
Py_buffer data = {NULL, NULL};
Py_ssize_t max_length = -1;
- if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
+ if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
&data, &max_length)) {
goto exit;
}
@@ -229,23 +229,27 @@ PyDoc_STRVAR(_lzma__decode_filter_properties__doc__,
"The result does not include the filter ID itself, only the options.");
#define _LZMA__DECODE_FILTER_PROPERTIES_METHODDEF \
- {"_decode_filter_properties", (PyCFunction)_lzma__decode_filter_properties, METH_VARARGS, _lzma__decode_filter_properties__doc__},
+ {"_decode_filter_properties", (PyCFunction)_lzma__decode_filter_properties, METH_FASTCALL, _lzma__decode_filter_properties__doc__},
static PyObject *
_lzma__decode_filter_properties_impl(PyObject *module, lzma_vli filter_id,
Py_buffer *encoded_props);
static PyObject *
-_lzma__decode_filter_properties(PyObject *module, PyObject *args)
+_lzma__decode_filter_properties(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
lzma_vli filter_id;
Py_buffer encoded_props = {NULL, NULL};
- if (!PyArg_ParseTuple(args, "O&y*:_decode_filter_properties",
+ if (!_PyArg_ParseStack(args, nargs, "O&y*:_decode_filter_properties",
lzma_vli_converter, &filter_id, &encoded_props)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("_decode_filter_properties", kwnames)) {
+ goto exit;
+ }
return_value = _lzma__decode_filter_properties_impl(module, filter_id, &encoded_props);
exit:
@@ -256,4 +260,4 @@ exit:
return return_value;
}
-/*[clinic end generated code: output=f27abae460122706 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5f7a915fb7e41453 input=a9049054013a1b77]*/