summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/_bz2module.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/clinic/_bz2module.c.h')
-rw-r--r--Modules/clinic/_bz2module.c.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/Modules/clinic/_bz2module.c.h b/Modules/clinic/_bz2module.c.h
index 3ed8303e..9451fd3 100644
--- a/Modules/clinic/_bz2module.c.h
+++ b/Modules/clinic/_bz2module.c.h
@@ -25,14 +25,16 @@ _bz2_BZ2Compressor_compress(BZ2Compressor *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 = _bz2_BZ2Compressor_compress_impl(self, &data);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -80,11 +82,13 @@ _bz2_BZ2Compressor___init__(PyObject *self, PyObject *args, PyObject *kwargs)
int compresslevel = 9;
if ((Py_TYPE(self) == &BZ2Compressor_Type) &&
- !_PyArg_NoKeywords("BZ2Compressor", kwargs))
+ !_PyArg_NoKeywords("BZ2Compressor", kwargs)) {
goto exit;
+ }
if (!PyArg_ParseTuple(args, "|i:BZ2Compressor",
- &compresslevel))
+ &compresslevel)) {
goto exit;
+ }
return_value = _bz2_BZ2Compressor___init___impl((BZ2Compressor *)self, compresslevel);
exit:
@@ -126,14 +130,16 @@ _bz2_BZ2Decompressor_decompress(BZ2Decompressor *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 = _bz2_BZ2Decompressor_decompress_impl(self, &data, max_length);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -155,14 +161,16 @@ _bz2_BZ2Decompressor___init__(PyObject *self, PyObject *args, PyObject *kwargs)
int return_value = -1;
if ((Py_TYPE(self) == &BZ2Decompressor_Type) &&
- !_PyArg_NoPositional("BZ2Decompressor", args))
+ !_PyArg_NoPositional("BZ2Decompressor", args)) {
goto exit;
+ }
if ((Py_TYPE(self) == &BZ2Decompressor_Type) &&
- !_PyArg_NoKeywords("BZ2Decompressor", kwargs))
+ !_PyArg_NoKeywords("BZ2Decompressor", kwargs)) {
goto exit;
+ }
return_value = _bz2_BZ2Decompressor___init___impl((BZ2Decompressor *)self);
exit:
return return_value;
}
-/*[clinic end generated code: output=fef29b76b3314fc7 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=71be22f38224fe84 input=a9049054013a1b77]*/