diff options
Diffstat (limited to 'Modules/clinic/_lzmamodule.c.h')
-rw-r--r-- | Modules/clinic/_lzmamodule.c.h | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/Modules/clinic/_lzmamodule.c.h b/Modules/clinic/_lzmamodule.c.h index f8d38ea..c2ac89a 100644 --- a/Modules/clinic/_lzmamodule.c.h +++ b/Modules/clinic/_lzmamodule.c.h @@ -25,14 +25,16 @@ _lzma_LZMACompressor_compress(Compressor *self, PyObject *arg) PyObject *return_value = NULL; Py_buffer data = {NULL, NULL}; - if (!PyArg_Parse(arg, "y*:compress", &data)) + if (!PyArg_Parse(arg, "y*:compress", &data)) { goto exit; + } return_value = _lzma_LZMACompressor_compress_impl(self, &data); exit: /* Cleanup for data */ - if (data.obj) + if (data.obj) { PyBuffer_Release(&data); + } return return_value; } @@ -89,19 +91,22 @@ static PyObject * _lzma_LZMADecompressor_decompress(Decompressor *self, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - static char *_keywords[] = {"data", "max_length", NULL}; + static const char * const _keywords[] = {"data", "max_length", NULL}; + static _PyArg_Parser _parser = {"y*|n:decompress", _keywords, 0}; Py_buffer data = {NULL, NULL}; Py_ssize_t max_length = -1; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|n:decompress", _keywords, - &data, &max_length)) + if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser, + &data, &max_length)) { goto exit; + } return_value = _lzma_LZMADecompressor_decompress_impl(self, &data, max_length); exit: /* Cleanup for data */ - if (data.obj) + if (data.obj) { PyBuffer_Release(&data); + } return return_value; } @@ -137,14 +142,16 @@ static int _lzma_LZMADecompressor___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - static char *_keywords[] = {"format", "memlimit", "filters", NULL}; + static const char * const _keywords[] = {"format", "memlimit", "filters", NULL}; + static _PyArg_Parser _parser = {"|iOO:LZMADecompressor", _keywords, 0}; int format = FORMAT_AUTO; PyObject *memlimit = Py_None; PyObject *filters = Py_None; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iOO:LZMADecompressor", _keywords, - &format, &memlimit, &filters)) + if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser, + &format, &memlimit, &filters)) { goto exit; + } return_value = _lzma_LZMADecompressor___init___impl((Decompressor *)self, format, memlimit, filters); exit: @@ -171,8 +178,9 @@ _lzma_is_check_supported(PyObject *module, PyObject *arg) PyObject *return_value = NULL; int check_id; - if (!PyArg_Parse(arg, "i:is_check_supported", &check_id)) + if (!PyArg_Parse(arg, "i:is_check_supported", &check_id)) { goto exit; + } return_value = _lzma_is_check_supported_impl(module, check_id); exit: @@ -199,8 +207,9 @@ _lzma__encode_filter_properties(PyObject *module, PyObject *arg) PyObject *return_value = NULL; lzma_filter filter = {LZMA_VLI_UNKNOWN, NULL}; - if (!PyArg_Parse(arg, "O&:_encode_filter_properties", lzma_filter_converter, &filter)) + if (!PyArg_Parse(arg, "O&:_encode_filter_properties", lzma_filter_converter, &filter)) { goto exit; + } return_value = _lzma__encode_filter_properties_impl(module, filter); exit: @@ -234,15 +243,17 @@ _lzma__decode_filter_properties(PyObject *module, PyObject *args) Py_buffer encoded_props = {NULL, NULL}; if (!PyArg_ParseTuple(args, "O&y*:_decode_filter_properties", - lzma_vli_converter, &filter_id, &encoded_props)) + lzma_vli_converter, &filter_id, &encoded_props)) { goto exit; + } return_value = _lzma__decode_filter_properties_impl(module, filter_id, &encoded_props); exit: /* Cleanup for encoded_props */ - if (encoded_props.obj) + if (encoded_props.obj) { PyBuffer_Release(&encoded_props); + } return return_value; } -/*[clinic end generated code: output=fada06020fd318cc input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9434583fe111c771 input=a9049054013a1b77]*/ |