diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-06-09 13:16:06 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-06-09 13:16:06 (GMT) |
commit | 5dee6551e2b98792bc6336206f763623483e7883 (patch) | |
tree | e18dfc32e889ca62dc3a0d3f4cd1484353d7a6aa /Modules/clinic/_lzmamodule.c.h | |
parent | 2561bf6ae0a16576321cfb8cb900869b109b2263 (diff) | |
download | cpython-5dee6551e2b98792bc6336206f763623483e7883.zip cpython-5dee6551e2b98792bc6336206f763623483e7883.tar.gz cpython-5dee6551e2b98792bc6336206f763623483e7883.tar.bz2 |
Issue #26305: Argument Clinic now uses braces in C code as required by PEP 7.
Diffstat (limited to 'Modules/clinic/_lzmamodule.c.h')
-rw-r--r-- | Modules/clinic/_lzmamodule.c.h | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/Modules/clinic/_lzmamodule.c.h b/Modules/clinic/_lzmamodule.c.h index 59d9d51..b78dbcd 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; } @@ -94,14 +96,16 @@ _lzma_LZMADecompressor_decompress(Decompressor *self, PyObject *args, PyObject * Py_ssize_t max_length = -1; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|n:decompress", _keywords, - &data, &max_length)) + &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; } @@ -143,8 +147,9 @@ _lzma_LZMADecompressor___init__(PyObject *self, PyObject *args, PyObject *kwargs PyObject *filters = Py_None; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iOO:LZMADecompressor", _keywords, - &format, &memlimit, &filters)) + &format, &memlimit, &filters)) { goto exit; + } return_value = _lzma_LZMADecompressor___init___impl((Decompressor *)self, format, memlimit, filters); exit: @@ -171,8 +176,9 @@ _lzma_is_check_supported(PyModuleDef *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 +205,9 @@ _lzma__encode_filter_properties(PyModuleDef *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 +241,17 @@ _lzma__decode_filter_properties(PyModuleDef *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=2d3e0842be3d3fe1 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=804aed7d196ba52e input=a9049054013a1b77]*/ |