summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_io/clinic/_iomodule.c.h5
-rw-r--r--Modules/_io/clinic/bufferedio.c.h65
-rw-r--r--Modules/_io/clinic/bytesio.c.h26
-rw-r--r--Modules/_io/clinic/fileio.c.h26
-rw-r--r--Modules/_io/clinic/iobase.c.h11
-rw-r--r--Modules/_io/clinic/stringio.c.h17
-rw-r--r--Modules/_io/clinic/textio.c.h26
-rw-r--r--Modules/_winapi.c4
-rw-r--r--Modules/cjkcodecs/clinic/multibytecodec.c.h29
-rw-r--r--Modules/clinic/_bz2module.c.h26
-rw-r--r--Modules/clinic/_codecsmodule.c.h191
-rw-r--r--Modules/clinic/_cryptmodule.c.h5
-rw-r--r--Modules/clinic/_cursesmodule.c.h14
-rw-r--r--Modules/clinic/_datetimemodule.c.h5
-rw-r--r--Modules/clinic/_dbmmodule.c.h11
-rw-r--r--Modules/clinic/_elementtree.c.h53
-rw-r--r--Modules/clinic/_gdbmmodule.c.h14
-rw-r--r--Modules/clinic/_lzmamodule.c.h29
-rw-r--r--Modules/clinic/_opcode.c.h8
-rw-r--r--Modules/clinic/_pickle.c.h29
-rw-r--r--Modules/clinic/_sre.c.h71
-rw-r--r--Modules/clinic/_ssl.c.h101
-rw-r--r--Modules/clinic/_tkinter.c.h53
-rw-r--r--Modules/clinic/_weakref.c.h5
-rw-r--r--Modules/clinic/_winapi.c.h116
-rw-r--r--Modules/clinic/arraymodule.c.h29
-rw-r--r--Modules/clinic/audioop.c.h167
-rw-r--r--Modules/clinic/binascii.c.h86
-rw-r--r--Modules/clinic/cmathmodule.c.h74
-rw-r--r--Modules/clinic/fcntlmodule.c.h14
-rw-r--r--Modules/clinic/grpmodule.c.h8
-rw-r--r--Modules/clinic/md5module.c.h5
-rw-r--r--Modules/clinic/posixmodule.c.h482
-rw-r--r--Modules/clinic/pwdmodule.c.h5
-rw-r--r--Modules/clinic/pyexpat.c.h23
-rw-r--r--Modules/clinic/sha1module.c.h5
-rw-r--r--Modules/clinic/sha256module.c.h8
-rw-r--r--Modules/clinic/sha512module.c.h8
-rw-r--r--Modules/clinic/signalmodule.c.h32
-rw-r--r--Modules/clinic/spwdmodule.c.h5
-rw-r--r--Modules/clinic/unicodedata.c.h44
-rw-r--r--Modules/clinic/zlibmodule.c.h53
42 files changed, 1311 insertions, 677 deletions
diff --git a/Modules/_io/clinic/_iomodule.c.h b/Modules/_io/clinic/_iomodule.c.h
index a3abb93cc7..6dcfc0812d 100644
--- a/Modules/_io/clinic/_iomodule.c.h
+++ b/Modules/_io/clinic/_iomodule.c.h
@@ -149,11 +149,12 @@ _io_open(PyModuleDef *module, PyObject *args, PyObject *kwargs)
PyObject *opener = Py_None;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|sizzziO:open", _keywords,
- &file, &mode, &buffering, &encoding, &errors, &newline, &closefd, &opener))
+ &file, &mode, &buffering, &encoding, &errors, &newline, &closefd, &opener)) {
goto exit;
+ }
return_value = _io_open_impl(module, file, mode, buffering, encoding, errors, newline, closefd, opener);
exit:
return return_value;
}
-/*[clinic end generated code: output=97cdc09bf68a8064 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=079f597e71e9f0c6 input=a9049054013a1b77]*/
diff --git a/Modules/_io/clinic/bufferedio.c.h b/Modules/_io/clinic/bufferedio.c.h
index 437e275730..c4dfc1640e 100644
--- a/Modules/_io/clinic/bufferedio.c.h
+++ b/Modules/_io/clinic/bufferedio.c.h
@@ -19,14 +19,16 @@ _io__BufferedIOBase_readinto(PyObject *self, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer buffer = {NULL, NULL};
- if (!PyArg_Parse(arg, "w*:readinto", &buffer))
+ if (!PyArg_Parse(arg, "w*:readinto", &buffer)) {
goto exit;
+ }
return_value = _io__BufferedIOBase_readinto_impl(self, &buffer);
exit:
/* Cleanup for buffer */
- if (buffer.obj)
+ if (buffer.obj) {
PyBuffer_Release(&buffer);
+ }
return return_value;
}
@@ -48,14 +50,16 @@ _io__BufferedIOBase_readinto1(PyObject *self, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer buffer = {NULL, NULL};
- if (!PyArg_Parse(arg, "w*:readinto1", &buffer))
+ if (!PyArg_Parse(arg, "w*:readinto1", &buffer)) {
goto exit;
+ }
return_value = _io__BufferedIOBase_readinto1_impl(self, &buffer);
exit:
/* Cleanup for buffer */
- if (buffer.obj)
+ if (buffer.obj) {
PyBuffer_Release(&buffer);
+ }
return return_value;
}
@@ -99,8 +103,9 @@ _io__Buffered_peek(buffered *self, PyObject *args)
Py_ssize_t size = 0;
if (!PyArg_ParseTuple(args, "|n:peek",
- &size))
+ &size)) {
goto exit;
+ }
return_value = _io__Buffered_peek_impl(self, size);
exit:
@@ -125,8 +130,9 @@ _io__Buffered_read(buffered *self, PyObject *args)
Py_ssize_t n = -1;
if (!PyArg_ParseTuple(args, "|O&:read",
- _PyIO_ConvertSsize_t, &n))
+ _PyIO_ConvertSsize_t, &n)) {
goto exit;
+ }
return_value = _io__Buffered_read_impl(self, n);
exit:
@@ -150,8 +156,9 @@ _io__Buffered_read1(buffered *self, PyObject *arg)
PyObject *return_value = NULL;
Py_ssize_t n;
- if (!PyArg_Parse(arg, "n:read1", &n))
+ if (!PyArg_Parse(arg, "n:read1", &n)) {
goto exit;
+ }
return_value = _io__Buffered_read1_impl(self, n);
exit:
@@ -175,14 +182,16 @@ _io__Buffered_readinto(buffered *self, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer buffer = {NULL, NULL};
- if (!PyArg_Parse(arg, "w*:readinto", &buffer))
+ if (!PyArg_Parse(arg, "w*:readinto", &buffer)) {
goto exit;
+ }
return_value = _io__Buffered_readinto_impl(self, &buffer);
exit:
/* Cleanup for buffer */
- if (buffer.obj)
+ if (buffer.obj) {
PyBuffer_Release(&buffer);
+ }
return return_value;
}
@@ -204,14 +213,16 @@ _io__Buffered_readinto1(buffered *self, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer buffer = {NULL, NULL};
- if (!PyArg_Parse(arg, "w*:readinto1", &buffer))
+ if (!PyArg_Parse(arg, "w*:readinto1", &buffer)) {
goto exit;
+ }
return_value = _io__Buffered_readinto1_impl(self, &buffer);
exit:
/* Cleanup for buffer */
- if (buffer.obj)
+ if (buffer.obj) {
PyBuffer_Release(&buffer);
+ }
return return_value;
}
@@ -234,8 +245,9 @@ _io__Buffered_readline(buffered *self, PyObject *args)
Py_ssize_t size = -1;
if (!PyArg_ParseTuple(args, "|O&:readline",
- _PyIO_ConvertSsize_t, &size))
+ _PyIO_ConvertSsize_t, &size)) {
goto exit;
+ }
return_value = _io__Buffered_readline_impl(self, size);
exit:
@@ -261,8 +273,9 @@ _io__Buffered_seek(buffered *self, PyObject *args)
int whence = 0;
if (!PyArg_ParseTuple(args, "O|i:seek",
- &targetobj, &whence))
+ &targetobj, &whence)) {
goto exit;
+ }
return_value = _io__Buffered_seek_impl(self, targetobj, whence);
exit:
@@ -288,8 +301,9 @@ _io__Buffered_truncate(buffered *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "truncate",
0, 1,
- &pos))
+ &pos)) {
goto exit;
+ }
return_value = _io__Buffered_truncate_impl(self, pos);
exit:
@@ -315,8 +329,9 @@ _io_BufferedReader___init__(PyObject *self, PyObject *args, PyObject *kwargs)
Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|n:BufferedReader", _keywords,
- &raw, &buffer_size))
+ &raw, &buffer_size)) {
goto exit;
+ }
return_value = _io_BufferedReader___init___impl((buffered *)self, raw, buffer_size);
exit:
@@ -346,8 +361,9 @@ _io_BufferedWriter___init__(PyObject *self, PyObject *args, PyObject *kwargs)
Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|n:BufferedWriter", _keywords,
- &raw, &buffer_size))
+ &raw, &buffer_size)) {
goto exit;
+ }
return_value = _io_BufferedWriter___init___impl((buffered *)self, raw, buffer_size);
exit:
@@ -371,14 +387,16 @@ _io_BufferedWriter_write(buffered *self, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer buffer = {NULL, NULL};
- if (!PyArg_Parse(arg, "y*:write", &buffer))
+ if (!PyArg_Parse(arg, "y*:write", &buffer)) {
goto exit;
+ }
return_value = _io_BufferedWriter_write_impl(self, &buffer);
exit:
/* Cleanup for buffer */
- if (buffer.obj)
+ if (buffer.obj) {
PyBuffer_Release(&buffer);
+ }
return return_value;
}
@@ -410,11 +428,13 @@ _io_BufferedRWPair___init__(PyObject *self, PyObject *args, PyObject *kwargs)
Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE;
if ((Py_TYPE(self) == &PyBufferedRWPair_Type) &&
- !_PyArg_NoKeywords("BufferedRWPair", kwargs))
+ !_PyArg_NoKeywords("BufferedRWPair", kwargs)) {
goto exit;
+ }
if (!PyArg_ParseTuple(args, "OO|n:BufferedRWPair",
- &reader, &writer, &buffer_size))
+ &reader, &writer, &buffer_size)) {
goto exit;
+ }
return_value = _io_BufferedRWPair___init___impl((rwpair *)self, reader, writer, buffer_size);
exit:
@@ -444,11 +464,12 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs)
Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|n:BufferedRandom", _keywords,
- &raw, &buffer_size))
+ &raw, &buffer_size)) {
goto exit;
+ }
return_value = _io_BufferedRandom___init___impl((buffered *)self, raw, buffer_size);
exit:
return return_value;
}
-/*[clinic end generated code: output=2bbb5e239b4ffe6f input=a9049054013a1b77]*/
+/*[clinic end generated code: output=4f6196c756b880c8 input=a9049054013a1b77]*/
diff --git a/Modules/_io/clinic/bytesio.c.h b/Modules/_io/clinic/bytesio.c.h
index 5f2abb03a7..1f736fed80 100644
--- a/Modules/_io/clinic/bytesio.c.h
+++ b/Modules/_io/clinic/bytesio.c.h
@@ -171,8 +171,9 @@ _io_BytesIO_read(bytesio *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "read",
0, 1,
- &arg))
+ &arg)) {
goto exit;
+ }
return_value = _io_BytesIO_read_impl(self, arg);
exit:
@@ -215,8 +216,9 @@ _io_BytesIO_readline(bytesio *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "readline",
0, 1,
- &arg))
+ &arg)) {
goto exit;
+ }
return_value = _io_BytesIO_readline_impl(self, arg);
exit:
@@ -247,8 +249,9 @@ _io_BytesIO_readlines(bytesio *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "readlines",
0, 1,
- &arg))
+ &arg)) {
goto exit;
+ }
return_value = _io_BytesIO_readlines_impl(self, arg);
exit:
@@ -276,14 +279,16 @@ _io_BytesIO_readinto(bytesio *self, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer buffer = {NULL, NULL};
- if (!PyArg_Parse(arg, "w*:readinto", &buffer))
+ if (!PyArg_Parse(arg, "w*:readinto", &buffer)) {
goto exit;
+ }
return_value = _io_BytesIO_readinto_impl(self, &buffer);
exit:
/* Cleanup for buffer */
- if (buffer.obj)
+ if (buffer.obj) {
PyBuffer_Release(&buffer);
+ }
return return_value;
}
@@ -311,8 +316,9 @@ _io_BytesIO_truncate(bytesio *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "truncate",
0, 1,
- &arg))
+ &arg)) {
goto exit;
+ }
return_value = _io_BytesIO_truncate_impl(self, arg);
exit:
@@ -345,8 +351,9 @@ _io_BytesIO_seek(bytesio *self, PyObject *args)
int whence = 0;
if (!PyArg_ParseTuple(args, "n|i:seek",
- &pos, &whence))
+ &pos, &whence)) {
goto exit;
+ }
return_value = _io_BytesIO_seek_impl(self, pos, whence);
exit:
@@ -412,11 +419,12 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs)
PyObject *initvalue = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:BytesIO", _keywords,
- &initvalue))
+ &initvalue)) {
goto exit;
+ }
return_value = _io_BytesIO___init___impl((bytesio *)self, initvalue);
exit:
return return_value;
}
-/*[clinic end generated code: output=60ce2c6272718431 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=3fdb62f3e3b0544d input=a9049054013a1b77]*/
diff --git a/Modules/_io/clinic/fileio.c.h b/Modules/_io/clinic/fileio.c.h
index 10420082ac..038836a2c1 100644
--- a/Modules/_io/clinic/fileio.c.h
+++ b/Modules/_io/clinic/fileio.c.h
@@ -56,8 +56,9 @@ _io_FileIO___init__(PyObject *self, PyObject *args, PyObject *kwargs)
PyObject *opener = Py_None;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|siO:FileIO", _keywords,
- &nameobj, &mode, &closefd, &opener))
+ &nameobj, &mode, &closefd, &opener)) {
goto exit;
+ }
return_value = _io_FileIO___init___impl((fileio *)self, nameobj, mode, closefd, opener);
exit:
@@ -154,14 +155,16 @@ _io_FileIO_readinto(fileio *self, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer buffer = {NULL, NULL};
- if (!PyArg_Parse(arg, "w*:readinto", &buffer))
+ if (!PyArg_Parse(arg, "w*:readinto", &buffer)) {
goto exit;
+ }
return_value = _io_FileIO_readinto_impl(self, &buffer);
exit:
/* Cleanup for buffer */
- if (buffer.obj)
+ if (buffer.obj) {
PyBuffer_Release(&buffer);
+ }
return return_value;
}
@@ -210,8 +213,9 @@ _io_FileIO_read(fileio *self, PyObject *args)
Py_ssize_t size = -1;
if (!PyArg_ParseTuple(args, "|O&:read",
- _PyIO_ConvertSsize_t, &size))
+ _PyIO_ConvertSsize_t, &size)) {
goto exit;
+ }
return_value = _io_FileIO_read_impl(self, size);
exit:
@@ -240,14 +244,16 @@ _io_FileIO_write(fileio *self, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer b = {NULL, NULL};
- if (!PyArg_Parse(arg, "y*:write", &b))
+ if (!PyArg_Parse(arg, "y*:write", &b)) {
goto exit;
+ }
return_value = _io_FileIO_write_impl(self, &b);
exit:
/* Cleanup for b */
- if (b.obj)
+ if (b.obj) {
PyBuffer_Release(&b);
+ }
return return_value;
}
@@ -280,8 +286,9 @@ _io_FileIO_seek(fileio *self, PyObject *args)
int whence = 0;
if (!PyArg_ParseTuple(args, "O|i:seek",
- &pos, &whence))
+ &pos, &whence)) {
goto exit;
+ }
return_value = _io_FileIO_seek_impl(self, pos, whence);
exit:
@@ -333,8 +340,9 @@ _io_FileIO_truncate(fileio *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "truncate",
0, 1,
- &posobj))
+ &posobj)) {
goto exit;
+ }
return_value = _io_FileIO_truncate_impl(self, posobj);
exit:
@@ -364,4 +372,4 @@ _io_FileIO_isatty(fileio *self, PyObject *Py_UNUSED(ignored))
#ifndef _IO_FILEIO_TRUNCATE_METHODDEF
#define _IO_FILEIO_TRUNCATE_METHODDEF
#endif /* !defined(_IO_FILEIO_TRUNCATE_METHODDEF) */
-/*[clinic end generated code: output=dcbc39b466598492 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=bf4b4bd6b976346d input=a9049054013a1b77]*/
diff --git a/Modules/_io/clinic/iobase.c.h b/Modules/_io/clinic/iobase.c.h
index 9762f11222..edbf73a40b 100644
--- a/Modules/_io/clinic/iobase.c.h
+++ b/Modules/_io/clinic/iobase.c.h
@@ -186,8 +186,9 @@ _io__IOBase_readline(PyObject *self, PyObject *args)
Py_ssize_t limit = -1;
if (!PyArg_ParseTuple(args, "|O&:readline",
- _PyIO_ConvertSsize_t, &limit))
+ _PyIO_ConvertSsize_t, &limit)) {
goto exit;
+ }
return_value = _io__IOBase_readline_impl(self, limit);
exit:
@@ -217,8 +218,9 @@ _io__IOBase_readlines(PyObject *self, PyObject *args)
Py_ssize_t hint = -1;
if (!PyArg_ParseTuple(args, "|O&:readlines",
- _PyIO_ConvertSsize_t, &hint))
+ _PyIO_ConvertSsize_t, &hint)) {
goto exit;
+ }
return_value = _io__IOBase_readlines_impl(self, hint);
exit:
@@ -251,8 +253,9 @@ _io__RawIOBase_read(PyObject *self, PyObject *args)
Py_ssize_t n = -1;
if (!PyArg_ParseTuple(args, "|n:read",
- &n))
+ &n)) {
goto exit;
+ }
return_value = _io__RawIOBase_read_impl(self, n);
exit:
@@ -276,4 +279,4 @@ _io__RawIOBase_readall(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return _io__RawIOBase_readall_impl(self);
}
-/*[clinic end generated code: output=b874952f5cc248a4 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=0f53fed928d8e02f input=a9049054013a1b77]*/
diff --git a/Modules/_io/clinic/stringio.c.h b/Modules/_io/clinic/stringio.c.h
index a8e32a3376..ce9f46e879 100644
--- a/Modules/_io/clinic/stringio.c.h
+++ b/Modules/_io/clinic/stringio.c.h
@@ -61,8 +61,9 @@ _io_StringIO_read(stringio *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "read",
0, 1,
- &arg))
+ &arg)) {
goto exit;
+ }
return_value = _io_StringIO_read_impl(self, arg);
exit:
@@ -91,8 +92,9 @@ _io_StringIO_readline(stringio *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "readline",
0, 1,
- &arg))
+ &arg)) {
goto exit;
+ }
return_value = _io_StringIO_readline_impl(self, arg);
exit:
@@ -123,8 +125,9 @@ _io_StringIO_truncate(stringio *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "truncate",
0, 1,
- &arg))
+ &arg)) {
goto exit;
+ }
return_value = _io_StringIO_truncate_impl(self, arg);
exit:
@@ -157,8 +160,9 @@ _io_StringIO_seek(stringio *self, PyObject *args)
int whence = 0;
if (!PyArg_ParseTuple(args, "n|i:seek",
- &pos, &whence))
+ &pos, &whence)) {
goto exit;
+ }
return_value = _io_StringIO_seek_impl(self, pos, whence);
exit:
@@ -222,8 +226,9 @@ _io_StringIO___init__(PyObject *self, PyObject *args, PyObject *kwargs)
PyObject *newline_obj = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:StringIO", _keywords,
- &value, &newline_obj))
+ &value, &newline_obj)) {
goto exit;
+ }
return_value = _io_StringIO___init___impl((stringio *)self, value, newline_obj);
exit:
@@ -283,4 +288,4 @@ _io_StringIO_seekable(stringio *self, PyObject *Py_UNUSED(ignored))
{
return _io_StringIO_seekable_impl(self);
}
-/*[clinic end generated code: output=f061cf3a20cd14ed input=a9049054013a1b77]*/
+/*[clinic end generated code: output=0513219581cbe952 input=a9049054013a1b77]*/
diff --git a/Modules/_io/clinic/textio.c.h b/Modules/_io/clinic/textio.c.h
index dc7e8c7584..f115326a00 100644
--- a/Modules/_io/clinic/textio.c.h
+++ b/Modules/_io/clinic/textio.c.h
@@ -30,8 +30,9 @@ _io_IncrementalNewlineDecoder___init__(PyObject *self, PyObject *args, PyObject
PyObject *errors = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Oi|O:IncrementalNewlineDecoder", _keywords,
- &decoder, &translate, &errors))
+ &decoder, &translate, &errors)) {
goto exit;
+ }
return_value = _io_IncrementalNewlineDecoder___init___impl((nldecoder_object *)self, decoder, translate, errors);
exit:
@@ -59,8 +60,9 @@ _io_IncrementalNewlineDecoder_decode(nldecoder_object *self, PyObject *args, PyO
int final = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i:decode", _keywords,
- &input, &final))
+ &input, &final)) {
goto exit;
+ }
return_value = _io_IncrementalNewlineDecoder_decode_impl(self, input, final);
exit:
@@ -162,8 +164,9 @@ _io_TextIOWrapper___init__(PyObject *self, PyObject *args, PyObject *kwargs)
int write_through = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|zzzii:TextIOWrapper", _keywords,
- &buffer, &encoding, &errors, &newline, &line_buffering, &write_through))
+ &buffer, &encoding, &errors, &newline, &line_buffering, &write_through)) {
goto exit;
+ }
return_value = _io_TextIOWrapper___init___impl((textio *)self, buffer, encoding, errors, newline, line_buffering, write_through);
exit:
@@ -204,8 +207,9 @@ _io_TextIOWrapper_write(textio *self, PyObject *arg)
PyObject *return_value = NULL;
PyObject *text;
- if (!PyArg_Parse(arg, "U:write", &text))
+ if (!PyArg_Parse(arg, "U:write", &text)) {
goto exit;
+ }
return_value = _io_TextIOWrapper_write_impl(self, text);
exit:
@@ -230,8 +234,9 @@ _io_TextIOWrapper_read(textio *self, PyObject *args)
Py_ssize_t n = -1;
if (!PyArg_ParseTuple(args, "|O&:read",
- _PyIO_ConvertSsize_t, &n))
+ _PyIO_ConvertSsize_t, &n)) {
goto exit;
+ }
return_value = _io_TextIOWrapper_read_impl(self, n);
exit:
@@ -256,8 +261,9 @@ _io_TextIOWrapper_readline(textio *self, PyObject *args)
Py_ssize_t size = -1;
if (!PyArg_ParseTuple(args, "|n:readline",
- &size))
+ &size)) {
goto exit;
+ }
return_value = _io_TextIOWrapper_readline_impl(self, size);
exit:
@@ -283,8 +289,9 @@ _io_TextIOWrapper_seek(textio *self, PyObject *args)
int whence = 0;
if (!PyArg_ParseTuple(args, "O|i:seek",
- &cookieObj, &whence))
+ &cookieObj, &whence)) {
goto exit;
+ }
return_value = _io_TextIOWrapper_seek_impl(self, cookieObj, whence);
exit:
@@ -327,8 +334,9 @@ _io_TextIOWrapper_truncate(textio *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "truncate",
0, 1,
- &pos))
+ &pos)) {
goto exit;
+ }
return_value = _io_TextIOWrapper_truncate_impl(self, pos);
exit:
@@ -453,4 +461,4 @@ _io_TextIOWrapper_close(textio *self, PyObject *Py_UNUSED(ignored))
{
return _io_TextIOWrapper_close_impl(self);
}
-/*[clinic end generated code: output=690608f85aab8ba5 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=31a39bbbe07ae4e7 input=a9049054013a1b77]*/
diff --git a/Modules/_winapi.c b/Modules/_winapi.c
index c4d4264226..2396fe29e6 100644
--- a/Modules/_winapi.c
+++ b/Modules/_winapi.c
@@ -175,7 +175,7 @@ class HANDLE_return_converter(CReturnConverter):
self.declare(data)
self.err_occurred_if("_return_value == INVALID_HANDLE_VALUE", data)
data.return_conversion.append(
- 'if (_return_value == NULL)\n Py_RETURN_NONE;\n')
+ 'if (_return_value == NULL) {\n Py_RETURN_NONE;\n}\n')
data.return_conversion.append(
'return_value = HANDLE_TO_PYNUM(_return_value);\n')
@@ -188,7 +188,7 @@ class DWORD_return_converter(CReturnConverter):
data.return_conversion.append(
'return_value = Py_BuildValue("k", _return_value);\n')
[python start generated code]*/
-/*[python end generated code: output=da39a3ee5e6b4b0d input=374076979596ebba]*/
+/*[python end generated code: output=da39a3ee5e6b4b0d input=94819e72d2c6d558]*/
#include "clinic/_winapi.c.h"
diff --git a/Modules/cjkcodecs/clinic/multibytecodec.c.h b/Modules/cjkcodecs/clinic/multibytecodec.c.h
index 8a47ff88a6..0d8a3e0e0d 100644
--- a/Modules/cjkcodecs/clinic/multibytecodec.c.h
+++ b/Modules/cjkcodecs/clinic/multibytecodec.c.h
@@ -30,8 +30,9 @@ _multibytecodec_MultibyteCodec_encode(MultibyteCodecObject *self, PyObject *args
const char *errors = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|z:encode", _keywords,
- &input, &errors))
+ &input, &errors)) {
goto exit;
+ }
return_value = _multibytecodec_MultibyteCodec_encode_impl(self, input, errors);
exit:
@@ -66,14 +67,16 @@ _multibytecodec_MultibyteCodec_decode(MultibyteCodecObject *self, PyObject *args
const char *errors = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|z:decode", _keywords,
- &input, &errors))
+ &input, &errors)) {
goto exit;
+ }
return_value = _multibytecodec_MultibyteCodec_decode_impl(self, &input, errors);
exit:
/* Cleanup for input */
- if (input.obj)
+ if (input.obj) {
PyBuffer_Release(&input);
+ }
return return_value;
}
@@ -100,8 +103,9 @@ _multibytecodec_MultibyteIncrementalEncoder_encode(MultibyteIncrementalEncoderOb
int final = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i:encode", _keywords,
- &input, &final))
+ &input, &final)) {
goto exit;
+ }
return_value = _multibytecodec_MultibyteIncrementalEncoder_encode_impl(self, input, final);
exit:
@@ -147,14 +151,16 @@ _multibytecodec_MultibyteIncrementalDecoder_decode(MultibyteIncrementalDecoderOb
int final = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|i:decode", _keywords,
- &input, &final))
+ &input, &final)) {
goto exit;
+ }
return_value = _multibytecodec_MultibyteIncrementalDecoder_decode_impl(self, &input, final);
exit:
/* Cleanup for input */
- if (input.obj)
+ if (input.obj) {
PyBuffer_Release(&input);
+ }
return return_value;
}
@@ -196,8 +202,9 @@ _multibytecodec_MultibyteStreamReader_read(MultibyteStreamReaderObject *self, Py
if (!PyArg_UnpackTuple(args, "read",
0, 1,
- &sizeobj))
+ &sizeobj)) {
goto exit;
+ }
return_value = _multibytecodec_MultibyteStreamReader_read_impl(self, sizeobj);
exit:
@@ -224,8 +231,9 @@ _multibytecodec_MultibyteStreamReader_readline(MultibyteStreamReaderObject *self
if (!PyArg_UnpackTuple(args, "readline",
0, 1,
- &sizeobj))
+ &sizeobj)) {
goto exit;
+ }
return_value = _multibytecodec_MultibyteStreamReader_readline_impl(self, sizeobj);
exit:
@@ -252,8 +260,9 @@ _multibytecodec_MultibyteStreamReader_readlines(MultibyteStreamReaderObject *sel
if (!PyArg_UnpackTuple(args, "readlines",
0, 1,
- &sizehintobj))
+ &sizehintobj)) {
goto exit;
+ }
return_value = _multibytecodec_MultibyteStreamReader_readlines_impl(self, sizehintobj);
exit:
@@ -317,4 +326,4 @@ PyDoc_STRVAR(_multibytecodec___create_codec__doc__,
#define _MULTIBYTECODEC___CREATE_CODEC_METHODDEF \
{"__create_codec", (PyCFunction)_multibytecodec___create_codec, METH_O, _multibytecodec___create_codec__doc__},
-/*[clinic end generated code: output=eebb21e18c3043d1 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=f837bc56b2fa2a4e input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_bz2module.c.h b/Modules/clinic/_bz2module.c.h
index 3ed8303e95..9451fd3b15 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]*/
diff --git a/Modules/clinic/_codecsmodule.c.h b/Modules/clinic/_codecsmodule.c.h
index 29f46bbb04..a7ca79e1bf 100644
--- a/Modules/clinic/_codecsmodule.c.h
+++ b/Modules/clinic/_codecsmodule.c.h
@@ -33,8 +33,9 @@ _codecs_lookup(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
const char *encoding;
- if (!PyArg_Parse(arg, "s:lookup", &encoding))
+ if (!PyArg_Parse(arg, "s:lookup", &encoding)) {
goto exit;
+ }
return_value = _codecs_lookup_impl(module, encoding);
exit:
@@ -70,8 +71,9 @@ _codecs_encode(PyModuleDef *module, PyObject *args, PyObject *kwargs)
const char *errors = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|ss:encode", _keywords,
- &obj, &encoding, &errors))
+ &obj, &encoding, &errors)) {
goto exit;
+ }
return_value = _codecs_encode_impl(module, obj, encoding, errors);
exit:
@@ -107,8 +109,9 @@ _codecs_decode(PyModuleDef *module, PyObject *args, PyObject *kwargs)
const char *errors = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|ss:decode", _keywords,
- &obj, &encoding, &errors))
+ &obj, &encoding, &errors)) {
goto exit;
+ }
return_value = _codecs_decode_impl(module, obj, encoding, errors);
exit:
@@ -133,8 +136,9 @@ _codecs__forget_codec(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
const char *encoding;
- if (!PyArg_Parse(arg, "s:_forget_codec", &encoding))
+ if (!PyArg_Parse(arg, "s:_forget_codec", &encoding)) {
goto exit;
+ }
return_value = _codecs__forget_codec_impl(module, encoding);
exit:
@@ -161,14 +165,16 @@ _codecs_escape_decode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "s*|z:escape_decode",
- &data, &errors))
+ &data, &errors)) {
goto exit;
+ }
return_value = _codecs_escape_decode_impl(module, &data, errors);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -193,8 +199,9 @@ _codecs_escape_encode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "O!|z:escape_encode",
- &PyBytes_Type, &data, &errors))
+ &PyBytes_Type, &data, &errors)) {
goto exit;
+ }
return_value = _codecs_escape_encode_impl(module, data, errors);
exit:
@@ -221,8 +228,9 @@ _codecs_unicode_internal_decode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "O|z:unicode_internal_decode",
- &obj, &errors))
+ &obj, &errors)) {
goto exit;
+ }
return_value = _codecs_unicode_internal_decode_impl(module, obj, errors);
exit:
@@ -250,14 +258,16 @@ _codecs_utf_7_decode(PyModuleDef *module, PyObject *args)
int final = 0;
if (!PyArg_ParseTuple(args, "y*|zi:utf_7_decode",
- &data, &errors, &final))
+ &data, &errors, &final)) {
goto exit;
+ }
return_value = _codecs_utf_7_decode_impl(module, &data, errors, final);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -283,14 +293,16 @@ _codecs_utf_8_decode(PyModuleDef *module, PyObject *args)
int final = 0;
if (!PyArg_ParseTuple(args, "y*|zi:utf_8_decode",
- &data, &errors, &final))
+ &data, &errors, &final)) {
goto exit;
+ }
return_value = _codecs_utf_8_decode_impl(module, &data, errors, final);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -316,14 +328,16 @@ _codecs_utf_16_decode(PyModuleDef *module, PyObject *args)
int final = 0;
if (!PyArg_ParseTuple(args, "y*|zi:utf_16_decode",
- &data, &errors, &final))
+ &data, &errors, &final)) {
goto exit;
+ }
return_value = _codecs_utf_16_decode_impl(module, &data, errors, final);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -349,14 +363,16 @@ _codecs_utf_16_le_decode(PyModuleDef *module, PyObject *args)
int final = 0;
if (!PyArg_ParseTuple(args, "y*|zi:utf_16_le_decode",
- &data, &errors, &final))
+ &data, &errors, &final)) {
goto exit;
+ }
return_value = _codecs_utf_16_le_decode_impl(module, &data, errors, final);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -382,14 +398,16 @@ _codecs_utf_16_be_decode(PyModuleDef *module, PyObject *args)
int final = 0;
if (!PyArg_ParseTuple(args, "y*|zi:utf_16_be_decode",
- &data, &errors, &final))
+ &data, &errors, &final)) {
goto exit;
+ }
return_value = _codecs_utf_16_be_decode_impl(module, &data, errors, final);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -417,14 +435,16 @@ _codecs_utf_16_ex_decode(PyModuleDef *module, PyObject *args)
int final = 0;
if (!PyArg_ParseTuple(args, "y*|zii:utf_16_ex_decode",
- &data, &errors, &byteorder, &final))
+ &data, &errors, &byteorder, &final)) {
goto exit;
+ }
return_value = _codecs_utf_16_ex_decode_impl(module, &data, errors, byteorder, final);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -450,14 +470,16 @@ _codecs_utf_32_decode(PyModuleDef *module, PyObject *args)
int final = 0;
if (!PyArg_ParseTuple(args, "y*|zi:utf_32_decode",
- &data, &errors, &final))
+ &data, &errors, &final)) {
goto exit;
+ }
return_value = _codecs_utf_32_decode_impl(module, &data, errors, final);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -483,14 +505,16 @@ _codecs_utf_32_le_decode(PyModuleDef *module, PyObject *args)
int final = 0;
if (!PyArg_ParseTuple(args, "y*|zi:utf_32_le_decode",
- &data, &errors, &final))
+ &data, &errors, &final)) {
goto exit;
+ }
return_value = _codecs_utf_32_le_decode_impl(module, &data, errors, final);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -516,14 +540,16 @@ _codecs_utf_32_be_decode(PyModuleDef *module, PyObject *args)
int final = 0;
if (!PyArg_ParseTuple(args, "y*|zi:utf_32_be_decode",
- &data, &errors, &final))
+ &data, &errors, &final)) {
goto exit;
+ }
return_value = _codecs_utf_32_be_decode_impl(module, &data, errors, final);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -551,14 +577,16 @@ _codecs_utf_32_ex_decode(PyModuleDef *module, PyObject *args)
int final = 0;
if (!PyArg_ParseTuple(args, "y*|zii:utf_32_ex_decode",
- &data, &errors, &byteorder, &final))
+ &data, &errors, &byteorder, &final)) {
goto exit;
+ }
return_value = _codecs_utf_32_ex_decode_impl(module, &data, errors, byteorder, final);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -583,14 +611,16 @@ _codecs_unicode_escape_decode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "s*|z:unicode_escape_decode",
- &data, &errors))
+ &data, &errors)) {
goto exit;
+ }
return_value = _codecs_unicode_escape_decode_impl(module, &data, errors);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -615,14 +645,16 @@ _codecs_raw_unicode_escape_decode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "s*|z:raw_unicode_escape_decode",
- &data, &errors))
+ &data, &errors)) {
goto exit;
+ }
return_value = _codecs_raw_unicode_escape_decode_impl(module, &data, errors);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -647,14 +679,16 @@ _codecs_latin_1_decode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "y*|z:latin_1_decode",
- &data, &errors))
+ &data, &errors)) {
goto exit;
+ }
return_value = _codecs_latin_1_decode_impl(module, &data, errors);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -679,14 +713,16 @@ _codecs_ascii_decode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "y*|z:ascii_decode",
- &data, &errors))
+ &data, &errors)) {
goto exit;
+ }
return_value = _codecs_ascii_decode_impl(module, &data, errors);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -712,14 +748,16 @@ _codecs_charmap_decode(PyModuleDef *module, PyObject *args)
PyObject *mapping = NULL;
if (!PyArg_ParseTuple(args, "y*|zO:charmap_decode",
- &data, &errors, &mapping))
+ &data, &errors, &mapping)) {
goto exit;
+ }
return_value = _codecs_charmap_decode_impl(module, &data, errors, mapping);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -747,14 +785,16 @@ _codecs_mbcs_decode(PyModuleDef *module, PyObject *args)
int final = 0;
if (!PyArg_ParseTuple(args, "y*|zi:mbcs_decode",
- &data, &errors, &final))
+ &data, &errors, &final)) {
goto exit;
+ }
return_value = _codecs_mbcs_decode_impl(module, &data, errors, final);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -785,14 +825,16 @@ _codecs_code_page_decode(PyModuleDef *module, PyObject *args)
int final = 0;
if (!PyArg_ParseTuple(args, "iy*|zi:code_page_decode",
- &codepage, &data, &errors, &final))
+ &codepage, &data, &errors, &final)) {
goto exit;
+ }
return_value = _codecs_code_page_decode_impl(module, codepage, &data, errors, final);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -819,14 +861,16 @@ _codecs_readbuffer_encode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "s*|z:readbuffer_encode",
- &data, &errors))
+ &data, &errors)) {
goto exit;
+ }
return_value = _codecs_readbuffer_encode_impl(module, &data, errors);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -851,8 +895,9 @@ _codecs_unicode_internal_encode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "O|z:unicode_internal_encode",
- &obj, &errors))
+ &obj, &errors)) {
goto exit;
+ }
return_value = _codecs_unicode_internal_encode_impl(module, obj, errors);
exit:
@@ -879,8 +924,9 @@ _codecs_utf_7_encode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "U|z:utf_7_encode",
- &str, &errors))
+ &str, &errors)) {
goto exit;
+ }
return_value = _codecs_utf_7_encode_impl(module, str, errors);
exit:
@@ -907,8 +953,9 @@ _codecs_utf_8_encode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "U|z:utf_8_encode",
- &str, &errors))
+ &str, &errors)) {
goto exit;
+ }
return_value = _codecs_utf_8_encode_impl(module, str, errors);
exit:
@@ -936,8 +983,9 @@ _codecs_utf_16_encode(PyModuleDef *module, PyObject *args)
int byteorder = 0;
if (!PyArg_ParseTuple(args, "U|zi:utf_16_encode",
- &str, &errors, &byteorder))
+ &str, &errors, &byteorder)) {
goto exit;
+ }
return_value = _codecs_utf_16_encode_impl(module, str, errors, byteorder);
exit:
@@ -964,8 +1012,9 @@ _codecs_utf_16_le_encode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "U|z:utf_16_le_encode",
- &str, &errors))
+ &str, &errors)) {
goto exit;
+ }
return_value = _codecs_utf_16_le_encode_impl(module, str, errors);
exit:
@@ -992,8 +1041,9 @@ _codecs_utf_16_be_encode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "U|z:utf_16_be_encode",
- &str, &errors))
+ &str, &errors)) {
goto exit;
+ }
return_value = _codecs_utf_16_be_encode_impl(module, str, errors);
exit:
@@ -1021,8 +1071,9 @@ _codecs_utf_32_encode(PyModuleDef *module, PyObject *args)
int byteorder = 0;
if (!PyArg_ParseTuple(args, "U|zi:utf_32_encode",
- &str, &errors, &byteorder))
+ &str, &errors, &byteorder)) {
goto exit;
+ }
return_value = _codecs_utf_32_encode_impl(module, str, errors, byteorder);
exit:
@@ -1049,8 +1100,9 @@ _codecs_utf_32_le_encode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "U|z:utf_32_le_encode",
- &str, &errors))
+ &str, &errors)) {
goto exit;
+ }
return_value = _codecs_utf_32_le_encode_impl(module, str, errors);
exit:
@@ -1077,8 +1129,9 @@ _codecs_utf_32_be_encode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "U|z:utf_32_be_encode",
- &str, &errors))
+ &str, &errors)) {
goto exit;
+ }
return_value = _codecs_utf_32_be_encode_impl(module, str, errors);
exit:
@@ -1105,8 +1158,9 @@ _codecs_unicode_escape_encode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "U|z:unicode_escape_encode",
- &str, &errors))
+ &str, &errors)) {
goto exit;
+ }
return_value = _codecs_unicode_escape_encode_impl(module, str, errors);
exit:
@@ -1133,8 +1187,9 @@ _codecs_raw_unicode_escape_encode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "U|z:raw_unicode_escape_encode",
- &str, &errors))
+ &str, &errors)) {
goto exit;
+ }
return_value = _codecs_raw_unicode_escape_encode_impl(module, str, errors);
exit:
@@ -1161,8 +1216,9 @@ _codecs_latin_1_encode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "U|z:latin_1_encode",
- &str, &errors))
+ &str, &errors)) {
goto exit;
+ }
return_value = _codecs_latin_1_encode_impl(module, str, errors);
exit:
@@ -1189,8 +1245,9 @@ _codecs_ascii_encode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "U|z:ascii_encode",
- &str, &errors))
+ &str, &errors)) {
goto exit;
+ }
return_value = _codecs_ascii_encode_impl(module, str, errors);
exit:
@@ -1218,8 +1275,9 @@ _codecs_charmap_encode(PyModuleDef *module, PyObject *args)
PyObject *mapping = NULL;
if (!PyArg_ParseTuple(args, "U|zO:charmap_encode",
- &str, &errors, &mapping))
+ &str, &errors, &mapping)) {
goto exit;
+ }
return_value = _codecs_charmap_encode_impl(module, str, errors, mapping);
exit:
@@ -1243,8 +1301,9 @@ _codecs_charmap_build(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
PyObject *map;
- if (!PyArg_Parse(arg, "U:charmap_build", &map))
+ if (!PyArg_Parse(arg, "U:charmap_build", &map)) {
goto exit;
+ }
return_value = _codecs_charmap_build_impl(module, map);
exit:
@@ -1273,8 +1332,9 @@ _codecs_mbcs_encode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "U|z:mbcs_encode",
- &str, &errors))
+ &str, &errors)) {
goto exit;
+ }
return_value = _codecs_mbcs_encode_impl(module, str, errors);
exit:
@@ -1306,8 +1366,9 @@ _codecs_code_page_encode(PyModuleDef *module, PyObject *args)
const char *errors = NULL;
if (!PyArg_ParseTuple(args, "iU|z:code_page_encode",
- &code_page, &str, &errors))
+ &code_page, &str, &errors)) {
goto exit;
+ }
return_value = _codecs_code_page_encode_impl(module, code_page, str, errors);
exit:
@@ -1341,8 +1402,9 @@ _codecs_register_error(PyModuleDef *module, PyObject *args)
PyObject *handler;
if (!PyArg_ParseTuple(args, "sO:register_error",
- &errors, &handler))
+ &errors, &handler)) {
goto exit;
+ }
return_value = _codecs_register_error_impl(module, errors, handler);
exit:
@@ -1370,8 +1432,9 @@ _codecs_lookup_error(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
const char *name;
- if (!PyArg_Parse(arg, "s:lookup_error", &name))
+ if (!PyArg_Parse(arg, "s:lookup_error", &name)) {
goto exit;
+ }
return_value = _codecs_lookup_error_impl(module, name);
exit:
@@ -1393,4 +1456,4 @@ exit:
#ifndef _CODECS_CODE_PAGE_ENCODE_METHODDEF
#define _CODECS_CODE_PAGE_ENCODE_METHODDEF
#endif /* !defined(_CODECS_CODE_PAGE_ENCODE_METHODDEF) */
-/*[clinic end generated code: output=04007a13c8387689 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=120320fe2ac32085 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_cryptmodule.c.h b/Modules/clinic/_cryptmodule.c.h
index b8ec31e003..664cba8dfb 100644
--- a/Modules/clinic/_cryptmodule.c.h
+++ b/Modules/clinic/_cryptmodule.c.h
@@ -27,11 +27,12 @@ crypt_crypt(PyModuleDef *module, PyObject *args)
const char *salt;
if (!PyArg_ParseTuple(args, "ss:crypt",
- &word, &salt))
+ &word, &salt)) {
goto exit;
+ }
return_value = crypt_crypt_impl(module, word, salt);
exit:
return return_value;
}
-/*[clinic end generated code: output=22c295c9bce018c4 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=6977cf9917d9a684 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_cursesmodule.c.h b/Modules/clinic/_cursesmodule.c.h
index 5e11742499..62ff1c8ae1 100644
--- a/Modules/clinic/_cursesmodule.c.h
+++ b/Modules/clinic/_cursesmodule.c.h
@@ -40,22 +40,26 @@ curses_window_addch(PyCursesWindowObject *self, PyObject *args)
switch (PyTuple_GET_SIZE(args)) {
case 1:
- if (!PyArg_ParseTuple(args, "O:addch", &ch))
+ if (!PyArg_ParseTuple(args, "O:addch", &ch)) {
goto exit;
+ }
break;
case 2:
- if (!PyArg_ParseTuple(args, "Ol:addch", &ch, &attr))
+ if (!PyArg_ParseTuple(args, "Ol:addch", &ch, &attr)) {
goto exit;
+ }
group_right_1 = 1;
break;
case 3:
- if (!PyArg_ParseTuple(args, "iiO:addch", &y, &x, &ch))
+ if (!PyArg_ParseTuple(args, "iiO:addch", &y, &x, &ch)) {
goto exit;
+ }
group_left_1 = 1;
break;
case 4:
- if (!PyArg_ParseTuple(args, "iiOl:addch", &y, &x, &ch, &attr))
+ if (!PyArg_ParseTuple(args, "iiOl:addch", &y, &x, &ch, &attr)) {
goto exit;
+ }
group_right_1 = 1;
group_left_1 = 1;
break;
@@ -68,4 +72,4 @@ curses_window_addch(PyCursesWindowObject *self, PyObject *args)
exit:
return return_value;
}
-/*[clinic end generated code: output=982b1e709577f3ec input=a9049054013a1b77]*/
+/*[clinic end generated code: output=13ffc5f8d79cbfbf input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_datetimemodule.c.h b/Modules/clinic/_datetimemodule.c.h
index 688c903e2f..cf9860b574 100644
--- a/Modules/clinic/_datetimemodule.c.h
+++ b/Modules/clinic/_datetimemodule.c.h
@@ -27,11 +27,12 @@ datetime_datetime_now(PyTypeObject *type, PyObject *args, PyObject *kwargs)
PyObject *tz = Py_None;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:now", _keywords,
- &tz))
+ &tz)) {
goto exit;
+ }
return_value = datetime_datetime_now_impl(type, tz);
exit:
return return_value;
}
-/*[clinic end generated code: output=7f45c670d6e4953a input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a82e6bd057a5dab9 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_dbmmodule.c.h b/Modules/clinic/_dbmmodule.c.h
index 8474e02828..b31da71eb9 100644
--- a/Modules/clinic/_dbmmodule.c.h
+++ b/Modules/clinic/_dbmmodule.c.h
@@ -60,8 +60,9 @@ _dbm_dbm_get(dbmobject *self, PyObject *args)
PyObject *default_value = NULL;
if (!PyArg_ParseTuple(args, "s#|O:get",
- &key, &key_length, &default_value))
+ &key, &key_length, &default_value)) {
goto exit;
+ }
return_value = _dbm_dbm_get_impl(self, key, key_length, default_value);
exit:
@@ -93,8 +94,9 @@ _dbm_dbm_setdefault(dbmobject *self, PyObject *args)
PyObject *default_value = NULL;
if (!PyArg_ParseTuple(args, "s#|O:setdefault",
- &key, &key_length, &default_value))
+ &key, &key_length, &default_value)) {
goto exit;
+ }
return_value = _dbm_dbm_setdefault_impl(self, key, key_length, default_value);
exit:
@@ -131,11 +133,12 @@ dbmopen(PyModuleDef *module, PyObject *args)
int mode = 438;
if (!PyArg_ParseTuple(args, "s|si:open",
- &filename, &flags, &mode))
+ &filename, &flags, &mode)) {
goto exit;
+ }
return_value = dbmopen_impl(module, filename, flags, mode);
exit:
return return_value;
}
-/*[clinic end generated code: output=1d92e81b28c558d0 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=97f8b6f542973b71 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_elementtree.c.h b/Modules/clinic/_elementtree.c.h
index 92e98cf0a2..266b92f85f 100644
--- a/Modules/clinic/_elementtree.c.h
+++ b/Modules/clinic/_elementtree.c.h
@@ -19,8 +19,9 @@ _elementtree_Element_append(ElementObject *self, PyObject *arg)
PyObject *return_value = NULL;
PyObject *subelement;
- if (!PyArg_Parse(arg, "O!:append", &Element_Type, &subelement))
+ if (!PyArg_Parse(arg, "O!:append", &Element_Type, &subelement)) {
goto exit;
+ }
return_value = _elementtree_Element_append_impl(self, subelement);
exit:
@@ -87,8 +88,9 @@ _elementtree_Element___sizeof__(ElementObject *self, PyObject *Py_UNUSED(ignored
Py_ssize_t _return_value;
_return_value = _elementtree_Element___sizeof___impl(self);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromSsize_t(_return_value);
exit:
@@ -149,8 +151,9 @@ _elementtree_Element_find(ElementObject *self, PyObject *args, PyObject *kwargs)
PyObject *namespaces = Py_None;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:find", _keywords,
- &path, &namespaces))
+ &path, &namespaces)) {
goto exit;
+ }
return_value = _elementtree_Element_find_impl(self, path, namespaces);
exit:
@@ -180,8 +183,9 @@ _elementtree_Element_findtext(ElementObject *self, PyObject *args, PyObject *kwa
PyObject *namespaces = Py_None;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:findtext", _keywords,
- &path, &default_value, &namespaces))
+ &path, &default_value, &namespaces)) {
goto exit;
+ }
return_value = _elementtree_Element_findtext_impl(self, path, default_value, namespaces);
exit:
@@ -209,8 +213,9 @@ _elementtree_Element_findall(ElementObject *self, PyObject *args, PyObject *kwar
PyObject *namespaces = Py_None;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:findall", _keywords,
- &path, &namespaces))
+ &path, &namespaces)) {
goto exit;
+ }
return_value = _elementtree_Element_findall_impl(self, path, namespaces);
exit:
@@ -238,8 +243,9 @@ _elementtree_Element_iterfind(ElementObject *self, PyObject *args, PyObject *kwa
PyObject *namespaces = Py_None;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:iterfind", _keywords,
- &path, &namespaces))
+ &path, &namespaces)) {
goto exit;
+ }
return_value = _elementtree_Element_iterfind_impl(self, path, namespaces);
exit:
@@ -267,8 +273,9 @@ _elementtree_Element_get(ElementObject *self, PyObject *args, PyObject *kwargs)
PyObject *default_value = Py_None;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:get", _keywords,
- &key, &default_value))
+ &key, &default_value)) {
goto exit;
+ }
return_value = _elementtree_Element_get_impl(self, key, default_value);
exit:
@@ -311,8 +318,9 @@ _elementtree_Element_iter(ElementObject *self, PyObject *args, PyObject *kwargs)
PyObject *tag = Py_None;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:iter", _keywords,
- &tag))
+ &tag)) {
goto exit;
+ }
return_value = _elementtree_Element_iter_impl(self, tag);
exit:
@@ -356,8 +364,9 @@ _elementtree_Element_insert(ElementObject *self, PyObject *args)
PyObject *subelement;
if (!PyArg_ParseTuple(args, "nO!:insert",
- &index, &Element_Type, &subelement))
+ &index, &Element_Type, &subelement)) {
goto exit;
+ }
return_value = _elementtree_Element_insert_impl(self, index, subelement);
exit:
@@ -419,8 +428,9 @@ _elementtree_Element_makeelement(ElementObject *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "makeelement",
2, 2,
- &tag, &attrib))
+ &tag, &attrib)) {
goto exit;
+ }
return_value = _elementtree_Element_makeelement_impl(self, tag, attrib);
exit:
@@ -444,8 +454,9 @@ _elementtree_Element_remove(ElementObject *self, PyObject *arg)
PyObject *return_value = NULL;
PyObject *subelement;
- if (!PyArg_Parse(arg, "O!:remove", &Element_Type, &subelement))
+ if (!PyArg_Parse(arg, "O!:remove", &Element_Type, &subelement)) {
goto exit;
+ }
return_value = _elementtree_Element_remove_impl(self, subelement);
exit:
@@ -473,8 +484,9 @@ _elementtree_Element_set(ElementObject *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "set",
2, 2,
- &key, &value))
+ &key, &value)) {
goto exit;
+ }
return_value = _elementtree_Element_set_impl(self, key, value);
exit:
@@ -493,8 +505,9 @@ _elementtree_TreeBuilder___init__(PyObject *self, PyObject *args, PyObject *kwar
PyObject *element_factory = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:TreeBuilder", _keywords,
- &element_factory))
+ &element_factory)) {
goto exit;
+ }
return_value = _elementtree_TreeBuilder___init___impl((TreeBuilderObject *)self, element_factory);
exit:
@@ -555,8 +568,9 @@ _elementtree_TreeBuilder_start(TreeBuilderObject *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "start",
1, 2,
- &tag, &attrs))
+ &tag, &attrs)) {
goto exit;
+ }
return_value = _elementtree_TreeBuilder_start_impl(self, tag, attrs);
exit:
@@ -577,8 +591,9 @@ _elementtree_XMLParser___init__(PyObject *self, PyObject *args, PyObject *kwargs
const char *encoding = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOz:XMLParser", _keywords,
- &html, &target, &encoding))
+ &html, &target, &encoding)) {
goto exit;
+ }
return_value = _elementtree_XMLParser___init___impl((XMLParserObject *)self, html, target, encoding);
exit:
@@ -640,8 +655,9 @@ _elementtree_XMLParser_doctype(XMLParserObject *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "doctype",
3, 3,
- &name, &pubid, &system))
+ &name, &pubid, &system)) {
goto exit;
+ }
return_value = _elementtree_XMLParser_doctype_impl(self, name, pubid, system);
exit:
@@ -670,11 +686,12 @@ _elementtree_XMLParser__setevents(XMLParserObject *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "_setevents",
1, 2,
- &events_queue, &events_to_report))
+ &events_queue, &events_to_report)) {
goto exit;
+ }
return_value = _elementtree_XMLParser__setevents_impl(self, events_queue, events_to_report);
exit:
return return_value;
}
-/*[clinic end generated code: output=19d94e2d2726d3aa input=a9049054013a1b77]*/
+/*[clinic end generated code: output=491eb5718c1ae64b input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_gdbmmodule.c.h b/Modules/clinic/_gdbmmodule.c.h
index 110ad9a539..23182c8712 100644
--- a/Modules/clinic/_gdbmmodule.c.h
+++ b/Modules/clinic/_gdbmmodule.c.h
@@ -23,8 +23,9 @@ _gdbm_gdbm_get(dbmobject *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "get",
1, 2,
- &key, &default_value))
+ &key, &default_value)) {
goto exit;
+ }
return_value = _gdbm_gdbm_get_impl(self, key, default_value);
exit:
@@ -53,8 +54,9 @@ _gdbm_gdbm_setdefault(dbmobject *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "setdefault",
1, 2,
- &key, &default_value))
+ &key, &default_value)) {
goto exit;
+ }
return_value = _gdbm_gdbm_setdefault_impl(self, key, default_value);
exit:
@@ -147,8 +149,9 @@ _gdbm_gdbm_nextkey(dbmobject *self, PyObject *arg)
const char *key;
Py_ssize_clean_t key_length;
- if (!PyArg_Parse(arg, "s#:nextkey", &key, &key_length))
+ if (!PyArg_Parse(arg, "s#:nextkey", &key, &key_length)) {
goto exit;
+ }
return_value = _gdbm_gdbm_nextkey_impl(self, key, key_length);
exit:
@@ -243,11 +246,12 @@ dbmopen(PyModuleDef *module, PyObject *args)
int mode = 438;
if (!PyArg_ParseTuple(args, "s|si:open",
- &name, &flags, &mode))
+ &name, &flags, &mode)) {
goto exit;
+ }
return_value = dbmopen_impl(module, name, flags, mode);
exit:
return return_value;
}
-/*[clinic end generated code: output=d3d8d871bcccb68a input=a9049054013a1b77]*/
+/*[clinic end generated code: output=418849fb5dbe69a5 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_lzmamodule.c.h b/Modules/clinic/_lzmamodule.c.h
index 59d9d51026..b78dbcd06c 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]*/
diff --git a/Modules/clinic/_opcode.c.h b/Modules/clinic/_opcode.c.h
index 196a2eefd3..68652b0388 100644
--- a/Modules/clinic/_opcode.c.h
+++ b/Modules/clinic/_opcode.c.h
@@ -23,14 +23,16 @@ _opcode_stack_effect(PyModuleDef *module, PyObject *args)
int _return_value;
if (!PyArg_ParseTuple(args, "i|O:stack_effect",
- &opcode, &oparg))
+ &opcode, &oparg)) {
goto exit;
+ }
_return_value = _opcode_stack_effect_impl(module, opcode, oparg);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong((long)_return_value);
exit:
return return_value;
}
-/*[clinic end generated code: output=8ee7cb735705e8b3 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5bd7c1c113e6526a input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_pickle.c.h b/Modules/clinic/_pickle.c.h
index ab4d205620..11299e97e6 100644
--- a/Modules/clinic/_pickle.c.h
+++ b/Modules/clinic/_pickle.c.h
@@ -53,8 +53,9 @@ _pickle_Pickler___sizeof__(PicklerObject *self, PyObject *Py_UNUSED(ignored))
Py_ssize_t _return_value;
_return_value = _pickle_Pickler___sizeof___impl(self);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromSsize_t(_return_value);
exit:
@@ -98,8 +99,9 @@ _pickle_Pickler___init__(PyObject *self, PyObject *args, PyObject *kwargs)
int fix_imports = 1;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|Op:Pickler", _keywords,
- &file, &protocol, &fix_imports))
+ &file, &protocol, &fix_imports)) {
goto exit;
+ }
return_value = _pickle_Pickler___init___impl((PicklerObject *)self, file, protocol, fix_imports);
exit:
@@ -212,8 +214,9 @@ _pickle_Unpickler_find_class(UnpicklerObject *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "find_class",
2, 2,
- &module_name, &global_name))
+ &module_name, &global_name)) {
goto exit;
+ }
return_value = _pickle_Unpickler_find_class_impl(self, module_name, global_name);
exit:
@@ -239,8 +242,9 @@ _pickle_Unpickler___sizeof__(UnpicklerObject *self, PyObject *Py_UNUSED(ignored)
Py_ssize_t _return_value;
_return_value = _pickle_Unpickler___sizeof___impl(self);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromSsize_t(_return_value);
exit:
@@ -288,8 +292,9 @@ _pickle_Unpickler___init__(PyObject *self, PyObject *args, PyObject *kwargs)
const char *errors = "strict";
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|$pss:Unpickler", _keywords,
- &file, &fix_imports, &encoding, &errors))
+ &file, &fix_imports, &encoding, &errors)) {
goto exit;
+ }
return_value = _pickle_Unpickler___init___impl((UnpicklerObject *)self, file, fix_imports, encoding, errors);
exit:
@@ -394,8 +399,9 @@ _pickle_dump(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int fix_imports = 1;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O$p:dump", _keywords,
- &obj, &file, &protocol, &fix_imports))
+ &obj, &file, &protocol, &fix_imports)) {
goto exit;
+ }
return_value = _pickle_dump_impl(module, obj, file, protocol, fix_imports);
exit:
@@ -437,8 +443,9 @@ _pickle_dumps(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int fix_imports = 1;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O$p:dumps", _keywords,
- &obj, &protocol, &fix_imports))
+ &obj, &protocol, &fix_imports)) {
goto exit;
+ }
return_value = _pickle_dumps_impl(module, obj, protocol, fix_imports);
exit:
@@ -492,8 +499,9 @@ _pickle_load(PyModuleDef *module, PyObject *args, PyObject *kwargs)
const char *errors = "strict";
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|$pss:load", _keywords,
- &file, &fix_imports, &encoding, &errors))
+ &file, &fix_imports, &encoding, &errors)) {
goto exit;
+ }
return_value = _pickle_load_impl(module, file, fix_imports, encoding, errors);
exit:
@@ -538,11 +546,12 @@ _pickle_loads(PyModuleDef *module, PyObject *args, PyObject *kwargs)
const char *errors = "strict";
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|$pss:loads", _keywords,
- &data, &fix_imports, &encoding, &errors))
+ &data, &fix_imports, &encoding, &errors)) {
goto exit;
+ }
return_value = _pickle_loads_impl(module, data, fix_imports, encoding, errors);
exit:
return return_value;
}
-/*[clinic end generated code: output=a7169d4fbbeef827 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5e972f339d197760 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_sre.c.h b/Modules/clinic/_sre.c.h
index 6de470847e..448d8afbc1 100644
--- a/Modules/clinic/_sre.c.h
+++ b/Modules/clinic/_sre.c.h
@@ -20,8 +20,9 @@ _sre_getcodesize(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
int _return_value;
_return_value = _sre_getcodesize_impl(module);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong((long)_return_value);
exit:
@@ -48,11 +49,13 @@ _sre_getlower(PyModuleDef *module, PyObject *args)
int _return_value;
if (!PyArg_ParseTuple(args, "ii:getlower",
- &character, &flags))
+ &character, &flags)) {
goto exit;
+ }
_return_value = _sre_getlower_impl(module, character, flags);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong((long)_return_value);
exit:
@@ -84,8 +87,9 @@ _sre_SRE_Pattern_match(PatternObject *self, PyObject *args, PyObject *kwargs)
PyObject *pattern = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|Onn$O:match", _keywords,
- &string, &pos, &endpos, &pattern))
+ &string, &pos, &endpos, &pattern)) {
goto exit;
+ }
return_value = _sre_SRE_Pattern_match_impl(self, string, pos, endpos, pattern);
exit:
@@ -118,8 +122,9 @@ _sre_SRE_Pattern_fullmatch(PatternObject *self, PyObject *args, PyObject *kwargs
PyObject *pattern = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|Onn$O:fullmatch", _keywords,
- &string, &pos, &endpos, &pattern))
+ &string, &pos, &endpos, &pattern)) {
goto exit;
+ }
return_value = _sre_SRE_Pattern_fullmatch_impl(self, string, pos, endpos, pattern);
exit:
@@ -154,8 +159,9 @@ _sre_SRE_Pattern_search(PatternObject *self, PyObject *args, PyObject *kwargs)
PyObject *pattern = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|Onn$O:search", _keywords,
- &string, &pos, &endpos, &pattern))
+ &string, &pos, &endpos, &pattern)) {
goto exit;
+ }
return_value = _sre_SRE_Pattern_search_impl(self, string, pos, endpos, pattern);
exit:
@@ -188,8 +194,9 @@ _sre_SRE_Pattern_findall(PatternObject *self, PyObject *args, PyObject *kwargs)
PyObject *source = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|Onn$O:findall", _keywords,
- &string, &pos, &endpos, &source))
+ &string, &pos, &endpos, &source)) {
goto exit;
+ }
return_value = _sre_SRE_Pattern_findall_impl(self, string, pos, endpos, source);
exit:
@@ -221,8 +228,9 @@ _sre_SRE_Pattern_finditer(PatternObject *self, PyObject *args, PyObject *kwargs)
Py_ssize_t endpos = PY_SSIZE_T_MAX;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|nn:finditer", _keywords,
- &string, &pos, &endpos))
+ &string, &pos, &endpos)) {
goto exit;
+ }
return_value = _sre_SRE_Pattern_finditer_impl(self, string, pos, endpos);
exit:
@@ -251,8 +259,9 @@ _sre_SRE_Pattern_scanner(PatternObject *self, PyObject *args, PyObject *kwargs)
Py_ssize_t endpos = PY_SSIZE_T_MAX;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|nn:scanner", _keywords,
- &string, &pos, &endpos))
+ &string, &pos, &endpos)) {
goto exit;
+ }
return_value = _sre_SRE_Pattern_scanner_impl(self, string, pos, endpos);
exit:
@@ -282,8 +291,9 @@ _sre_SRE_Pattern_split(PatternObject *self, PyObject *args, PyObject *kwargs)
PyObject *source = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|On$O:split", _keywords,
- &string, &maxsplit, &source))
+ &string, &maxsplit, &source)) {
goto exit;
+ }
return_value = _sre_SRE_Pattern_split_impl(self, string, maxsplit, source);
exit:
@@ -313,8 +323,9 @@ _sre_SRE_Pattern_sub(PatternObject *self, PyObject *args, PyObject *kwargs)
Py_ssize_t count = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|n:sub", _keywords,
- &repl, &string, &count))
+ &repl, &string, &count)) {
goto exit;
+ }
return_value = _sre_SRE_Pattern_sub_impl(self, repl, string, count);
exit:
@@ -344,8 +355,9 @@ _sre_SRE_Pattern_subn(PatternObject *self, PyObject *args, PyObject *kwargs)
Py_ssize_t count = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|n:subn", _keywords,
- &repl, &string, &count))
+ &repl, &string, &count)) {
goto exit;
+ }
return_value = _sre_SRE_Pattern_subn_impl(self, repl, string, count);
exit:
@@ -388,8 +400,9 @@ _sre_SRE_Pattern___deepcopy__(PatternObject *self, PyObject *args, PyObject *kwa
PyObject *memo;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:__deepcopy__", _keywords,
- &memo))
+ &memo)) {
goto exit;
+ }
return_value = _sre_SRE_Pattern___deepcopy___impl(self, memo);
exit:
@@ -423,8 +436,9 @@ _sre_compile(PyModuleDef *module, PyObject *args, PyObject *kwargs)
PyObject *indexgroup;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO!nOO:compile", _keywords,
- &pattern, &flags, &PyList_Type, &code, &groups, &groupindex, &indexgroup))
+ &pattern, &flags, &PyList_Type, &code, &groups, &groupindex, &indexgroup)) {
goto exit;
+ }
return_value = _sre_compile_impl(module, pattern, flags, code, groups, groupindex, indexgroup);
exit:
@@ -451,8 +465,9 @@ _sre_SRE_Match_expand(MatchObject *self, PyObject *args, PyObject *kwargs)
PyObject *template;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:expand", _keywords,
- &template))
+ &template)) {
goto exit;
+ }
return_value = _sre_SRE_Match_expand_impl(self, template);
exit:
@@ -482,8 +497,9 @@ _sre_SRE_Match_groups(MatchObject *self, PyObject *args, PyObject *kwargs)
PyObject *default_value = Py_None;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:groups", _keywords,
- &default_value))
+ &default_value)) {
goto exit;
+ }
return_value = _sre_SRE_Match_groups_impl(self, default_value);
exit:
@@ -513,8 +529,9 @@ _sre_SRE_Match_groupdict(MatchObject *self, PyObject *args, PyObject *kwargs)
PyObject *default_value = Py_None;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:groupdict", _keywords,
- &default_value))
+ &default_value)) {
goto exit;
+ }
return_value = _sre_SRE_Match_groupdict_impl(self, default_value);
exit:
@@ -542,11 +559,13 @@ _sre_SRE_Match_start(MatchObject *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "start",
0, 1,
- &group))
+ &group)) {
goto exit;
+ }
_return_value = _sre_SRE_Match_start_impl(self, group);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromSsize_t(_return_value);
exit:
@@ -574,11 +593,13 @@ _sre_SRE_Match_end(MatchObject *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "end",
0, 1,
- &group))
+ &group)) {
goto exit;
+ }
_return_value = _sre_SRE_Match_end_impl(self, group);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromSsize_t(_return_value);
exit:
@@ -605,8 +626,9 @@ _sre_SRE_Match_span(MatchObject *self, PyObject *args)
if (!PyArg_UnpackTuple(args, "span",
0, 1,
- &group))
+ &group)) {
goto exit;
+ }
return_value = _sre_SRE_Match_span_impl(self, group);
exit:
@@ -649,8 +671,9 @@ _sre_SRE_Match___deepcopy__(MatchObject *self, PyObject *args, PyObject *kwargs)
PyObject *memo;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:__deepcopy__", _keywords,
- &memo))
+ &memo)) {
goto exit;
+ }
return_value = _sre_SRE_Match___deepcopy___impl(self, memo);
exit:
@@ -690,4 +713,4 @@ _sre_SRE_Scanner_search(ScannerObject *self, PyObject *Py_UNUSED(ignored))
{
return _sre_SRE_Scanner_search_impl(self);
}
-/*[clinic end generated code: output=d1d73ab2c5008bd4 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=00f7bf869b3283bc input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_ssl.c.h b/Modules/clinic/_ssl.c.h
index 4dbc5d0010..2bf46b5c1b 100644
--- a/Modules/clinic/_ssl.c.h
+++ b/Modules/clinic/_ssl.c.h
@@ -36,8 +36,9 @@ _ssl__test_decode_cert(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
PyObject *path;
- if (!PyArg_Parse(arg, "O&:_test_decode_cert", PyUnicode_FSConverter, &path))
+ if (!PyArg_Parse(arg, "O&:_test_decode_cert", PyUnicode_FSConverter, &path)) {
goto exit;
+ }
return_value = _ssl__test_decode_cert_impl(module, path);
exit:
@@ -71,8 +72,9 @@ _ssl__SSLSocket_peer_certificate(PySSLSocket *self, PyObject *args)
int binary_mode = 0;
if (!PyArg_ParseTuple(args, "|p:peer_certificate",
- &binary_mode))
+ &binary_mode)) {
goto exit;
+ }
return_value = _ssl__SSLSocket_peer_certificate_impl(self, binary_mode);
exit:
@@ -209,14 +211,16 @@ _ssl__SSLSocket_write(PySSLSocket *self, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer b = {NULL, NULL};
- if (!PyArg_Parse(arg, "y*:write", &b))
+ if (!PyArg_Parse(arg, "y*:write", &b)) {
goto exit;
+ }
return_value = _ssl__SSLSocket_write_impl(self, &b);
exit:
/* Cleanup for b */
- if (b.obj)
+ if (b.obj) {
PyBuffer_Release(&b);
+ }
return return_value;
}
@@ -260,12 +264,14 @@ _ssl__SSLSocket_read(PySSLSocket *self, PyObject *args)
switch (PyTuple_GET_SIZE(args)) {
case 1:
- if (!PyArg_ParseTuple(args, "i:read", &len))
+ if (!PyArg_ParseTuple(args, "i:read", &len)) {
goto exit;
+ }
break;
case 2:
- if (!PyArg_ParseTuple(args, "iw*:read", &len, &buffer))
+ if (!PyArg_ParseTuple(args, "iw*:read", &len, &buffer)) {
goto exit;
+ }
group_right_1 = 1;
break;
default:
@@ -276,8 +282,9 @@ _ssl__SSLSocket_read(PySSLSocket *self, PyObject *args)
exit:
/* Cleanup for buffer */
- if (buffer.obj)
+ if (buffer.obj) {
PyBuffer_Release(&buffer);
+ }
return return_value;
}
@@ -332,11 +339,13 @@ _ssl__SSLContext(PyTypeObject *type, PyObject *args, PyObject *kwargs)
int proto_version;
if ((type == &PySSLContext_Type) &&
- !_PyArg_NoKeywords("_SSLContext", kwargs))
+ !_PyArg_NoKeywords("_SSLContext", kwargs)) {
goto exit;
+ }
if (!PyArg_ParseTuple(args, "i:_SSLContext",
- &proto_version))
+ &proto_version)) {
goto exit;
+ }
return_value = _ssl__SSLContext_impl(type, proto_version);
exit:
@@ -360,8 +369,9 @@ _ssl__SSLContext_set_ciphers(PySSLContext *self, PyObject *arg)
PyObject *return_value = NULL;
const char *cipherlist;
- if (!PyArg_Parse(arg, "s:set_ciphers", &cipherlist))
+ if (!PyArg_Parse(arg, "s:set_ciphers", &cipherlist)) {
goto exit;
+ }
return_value = _ssl__SSLContext_set_ciphers_impl(self, cipherlist);
exit:
@@ -386,14 +396,16 @@ _ssl__SSLContext__set_npn_protocols(PySSLContext *self, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer protos = {NULL, NULL};
- if (!PyArg_Parse(arg, "y*:_set_npn_protocols", &protos))
+ if (!PyArg_Parse(arg, "y*:_set_npn_protocols", &protos)) {
goto exit;
+ }
return_value = _ssl__SSLContext__set_npn_protocols_impl(self, &protos);
exit:
/* Cleanup for protos */
- if (protos.obj)
+ if (protos.obj) {
PyBuffer_Release(&protos);
+ }
return return_value;
}
@@ -416,14 +428,16 @@ _ssl__SSLContext__set_alpn_protocols(PySSLContext *self, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer protos = {NULL, NULL};
- if (!PyArg_Parse(arg, "y*:_set_alpn_protocols", &protos))
+ if (!PyArg_Parse(arg, "y*:_set_alpn_protocols", &protos)) {
goto exit;
+ }
return_value = _ssl__SSLContext__set_alpn_protocols_impl(self, &protos);
exit:
/* Cleanup for protos */
- if (protos.obj)
+ if (protos.obj) {
PyBuffer_Release(&protos);
+ }
return return_value;
}
@@ -450,8 +464,9 @@ _ssl__SSLContext_load_cert_chain(PySSLContext *self, PyObject *args, PyObject *k
PyObject *password = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:load_cert_chain", _keywords,
- &certfile, &keyfile, &password))
+ &certfile, &keyfile, &password)) {
goto exit;
+ }
return_value = _ssl__SSLContext_load_cert_chain_impl(self, certfile, keyfile, password);
exit:
@@ -482,8 +497,9 @@ _ssl__SSLContext_load_verify_locations(PySSLContext *self, PyObject *args, PyObj
PyObject *cadata = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOO:load_verify_locations", _keywords,
- &cafile, &capath, &cadata))
+ &cafile, &capath, &cadata)) {
goto exit;
+ }
return_value = _ssl__SSLContext_load_verify_locations_impl(self, cafile, capath, cadata);
exit:
@@ -520,8 +536,9 @@ _ssl__SSLContext__wrap_socket(PySSLContext *self, PyObject *args, PyObject *kwar
PyObject *hostname_obj = Py_None;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!i|O:_wrap_socket", _keywords,
- PySocketModule.Sock_Type, &sock, &server_side, &hostname_obj))
+ PySocketModule.Sock_Type, &sock, &server_side, &hostname_obj)) {
goto exit;
+ }
return_value = _ssl__SSLContext__wrap_socket_impl(self, sock, server_side, hostname_obj);
exit:
@@ -553,8 +570,9 @@ _ssl__SSLContext__wrap_bio(PySSLContext *self, PyObject *args, PyObject *kwargs)
PyObject *hostname_obj = Py_None;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O!i|O:_wrap_bio", _keywords,
- &PySSLMemoryBIO_Type, &incoming, &PySSLMemoryBIO_Type, &outgoing, &server_side, &hostname_obj))
+ &PySSLMemoryBIO_Type, &incoming, &PySSLMemoryBIO_Type, &outgoing, &server_side, &hostname_obj)) {
goto exit;
+ }
return_value = _ssl__SSLContext__wrap_bio_impl(self, incoming, outgoing, server_side, hostname_obj);
exit:
@@ -670,8 +688,9 @@ _ssl__SSLContext_get_ca_certs(PySSLContext *self, PyObject *args, PyObject *kwar
int binary_form = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|p:get_ca_certs", _keywords,
- &binary_form))
+ &binary_form)) {
goto exit;
+ }
return_value = _ssl__SSLContext_get_ca_certs_impl(self, binary_form);
exit:
@@ -687,11 +706,13 @@ _ssl_MemoryBIO(PyTypeObject *type, PyObject *args, PyObject *kwargs)
PyObject *return_value = NULL;
if ((type == &PySSLMemoryBIO_Type) &&
- !_PyArg_NoPositional("MemoryBIO", args))
+ !_PyArg_NoPositional("MemoryBIO", args)) {
goto exit;
+ }
if ((type == &PySSLMemoryBIO_Type) &&
- !_PyArg_NoKeywords("MemoryBIO", kwargs))
+ !_PyArg_NoKeywords("MemoryBIO", kwargs)) {
goto exit;
+ }
return_value = _ssl_MemoryBIO_impl(type);
exit:
@@ -722,8 +743,9 @@ _ssl_MemoryBIO_read(PySSLMemoryBIO *self, PyObject *args)
int len = -1;
if (!PyArg_ParseTuple(args, "|i:read",
- &len))
+ &len)) {
goto exit;
+ }
return_value = _ssl_MemoryBIO_read_impl(self, len);
exit:
@@ -750,14 +772,16 @@ _ssl_MemoryBIO_write(PySSLMemoryBIO *self, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer b = {NULL, NULL};
- if (!PyArg_Parse(arg, "y*:write", &b))
+ if (!PyArg_Parse(arg, "y*:write", &b)) {
goto exit;
+ }
return_value = _ssl_MemoryBIO_write_impl(self, &b);
exit:
/* Cleanup for b */
- if (b.obj)
+ if (b.obj) {
PyBuffer_Release(&b);
+ }
return return_value;
}
@@ -805,14 +829,16 @@ _ssl_RAND_add(PyModuleDef *module, PyObject *args)
double entropy;
if (!PyArg_ParseTuple(args, "s*d:RAND_add",
- &view, &entropy))
+ &view, &entropy)) {
goto exit;
+ }
return_value = _ssl_RAND_add_impl(module, &view, entropy);
exit:
/* Cleanup for view */
- if (view.obj)
+ if (view.obj) {
PyBuffer_Release(&view);
+ }
return return_value;
}
@@ -835,8 +861,9 @@ _ssl_RAND_bytes(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
int n;
- if (!PyArg_Parse(arg, "i:RAND_bytes", &n))
+ if (!PyArg_Parse(arg, "i:RAND_bytes", &n)) {
goto exit;
+ }
return_value = _ssl_RAND_bytes_impl(module, n);
exit:
@@ -864,8 +891,9 @@ _ssl_RAND_pseudo_bytes(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
int n;
- if (!PyArg_Parse(arg, "i:RAND_pseudo_bytes", &n))
+ if (!PyArg_Parse(arg, "i:RAND_pseudo_bytes", &n)) {
goto exit;
+ }
return_value = _ssl_RAND_pseudo_bytes_impl(module, n);
exit:
@@ -916,8 +944,9 @@ _ssl_RAND_egd(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
PyObject *path;
- if (!PyArg_Parse(arg, "O&:RAND_egd", PyUnicode_FSConverter, &path))
+ if (!PyArg_Parse(arg, "O&:RAND_egd", PyUnicode_FSConverter, &path)) {
goto exit;
+ }
return_value = _ssl_RAND_egd_impl(module, path);
exit:
@@ -970,8 +999,9 @@ _ssl_txt2obj(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int name = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|p:txt2obj", _keywords,
- &txt, &name))
+ &txt, &name)) {
goto exit;
+ }
return_value = _ssl_txt2obj_impl(module, txt, name);
exit:
@@ -996,8 +1026,9 @@ _ssl_nid2obj(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
int nid;
- if (!PyArg_Parse(arg, "i:nid2obj", &nid))
+ if (!PyArg_Parse(arg, "i:nid2obj", &nid)) {
goto exit;
+ }
return_value = _ssl_nid2obj_impl(module, nid);
exit:
@@ -1032,8 +1063,9 @@ _ssl_enum_certificates(PyModuleDef *module, PyObject *args, PyObject *kwargs)
const char *store_name;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s:enum_certificates", _keywords,
- &store_name))
+ &store_name)) {
goto exit;
+ }
return_value = _ssl_enum_certificates_impl(module, store_name);
exit:
@@ -1069,8 +1101,9 @@ _ssl_enum_crls(PyModuleDef *module, PyObject *args, PyObject *kwargs)
const char *store_name;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s:enum_crls", _keywords,
- &store_name))
+ &store_name)) {
goto exit;
+ }
return_value = _ssl_enum_crls_impl(module, store_name);
exit:
@@ -1102,4 +1135,4 @@ exit:
#ifndef _SSL_ENUM_CRLS_METHODDEF
#define _SSL_ENUM_CRLS_METHODDEF
#endif /* !defined(_SSL_ENUM_CRLS_METHODDEF) */
-/*[clinic end generated code: output=a14999cb565a69a2 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=c6fe203099a5aa89 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_tkinter.c.h b/Modules/clinic/_tkinter.c.h
index 7917dec9c4..73527fc901 100644
--- a/Modules/clinic/_tkinter.c.h
+++ b/Modules/clinic/_tkinter.c.h
@@ -19,8 +19,9 @@ _tkinter_tkapp_eval(TkappObject *self, PyObject *arg)
PyObject *return_value = NULL;
const char *script;
- if (!PyArg_Parse(arg, "s:eval", &script))
+ if (!PyArg_Parse(arg, "s:eval", &script)) {
goto exit;
+ }
return_value = _tkinter_tkapp_eval_impl(self, script);
exit:
@@ -44,8 +45,9 @@ _tkinter_tkapp_evalfile(TkappObject *self, PyObject *arg)
PyObject *return_value = NULL;
const char *fileName;
- if (!PyArg_Parse(arg, "s:evalfile", &fileName))
+ if (!PyArg_Parse(arg, "s:evalfile", &fileName)) {
goto exit;
+ }
return_value = _tkinter_tkapp_evalfile_impl(self, fileName);
exit:
@@ -69,8 +71,9 @@ _tkinter_tkapp_record(TkappObject *self, PyObject *arg)
PyObject *return_value = NULL;
const char *script;
- if (!PyArg_Parse(arg, "s:record", &script))
+ if (!PyArg_Parse(arg, "s:record", &script)) {
goto exit;
+ }
return_value = _tkinter_tkapp_record_impl(self, script);
exit:
@@ -94,8 +97,9 @@ _tkinter_tkapp_adderrinfo(TkappObject *self, PyObject *arg)
PyObject *return_value = NULL;
const char *msg;
- if (!PyArg_Parse(arg, "s:adderrinfo", &msg))
+ if (!PyArg_Parse(arg, "s:adderrinfo", &msg)) {
goto exit;
+ }
return_value = _tkinter_tkapp_adderrinfo_impl(self, msg);
exit:
@@ -143,8 +147,9 @@ _tkinter_tkapp_exprstring(TkappObject *self, PyObject *arg)
PyObject *return_value = NULL;
const char *s;
- if (!PyArg_Parse(arg, "s:exprstring", &s))
+ if (!PyArg_Parse(arg, "s:exprstring", &s)) {
goto exit;
+ }
return_value = _tkinter_tkapp_exprstring_impl(self, s);
exit:
@@ -168,8 +173,9 @@ _tkinter_tkapp_exprlong(TkappObject *self, PyObject *arg)
PyObject *return_value = NULL;
const char *s;
- if (!PyArg_Parse(arg, "s:exprlong", &s))
+ if (!PyArg_Parse(arg, "s:exprlong", &s)) {
goto exit;
+ }
return_value = _tkinter_tkapp_exprlong_impl(self, s);
exit:
@@ -193,8 +199,9 @@ _tkinter_tkapp_exprdouble(TkappObject *self, PyObject *arg)
PyObject *return_value = NULL;
const char *s;
- if (!PyArg_Parse(arg, "s:exprdouble", &s))
+ if (!PyArg_Parse(arg, "s:exprdouble", &s)) {
goto exit;
+ }
return_value = _tkinter_tkapp_exprdouble_impl(self, s);
exit:
@@ -218,8 +225,9 @@ _tkinter_tkapp_exprboolean(TkappObject *self, PyObject *arg)
PyObject *return_value = NULL;
const char *s;
- if (!PyArg_Parse(arg, "s:exprboolean", &s))
+ if (!PyArg_Parse(arg, "s:exprboolean", &s)) {
goto exit;
+ }
return_value = _tkinter_tkapp_exprboolean_impl(self, s);
exit:
@@ -262,8 +270,9 @@ _tkinter_tkapp_createcommand(TkappObject *self, PyObject *args)
PyObject *func;
if (!PyArg_ParseTuple(args, "sO:createcommand",
- &name, &func))
+ &name, &func)) {
goto exit;
+ }
return_value = _tkinter_tkapp_createcommand_impl(self, name, func);
exit:
@@ -287,8 +296,9 @@ _tkinter_tkapp_deletecommand(TkappObject *self, PyObject *arg)
PyObject *return_value = NULL;
const char *name;
- if (!PyArg_Parse(arg, "s:deletecommand", &name))
+ if (!PyArg_Parse(arg, "s:deletecommand", &name)) {
goto exit;
+ }
return_value = _tkinter_tkapp_deletecommand_impl(self, name);
exit:
@@ -318,8 +328,9 @@ _tkinter_tkapp_createfilehandler(TkappObject *self, PyObject *args)
PyObject *func;
if (!PyArg_ParseTuple(args, "OiO:createfilehandler",
- &file, &mask, &func))
+ &file, &mask, &func)) {
goto exit;
+ }
return_value = _tkinter_tkapp_createfilehandler_impl(self, file, mask, func);
exit:
@@ -377,8 +388,9 @@ _tkinter_tkapp_createtimerhandler(TkappObject *self, PyObject *args)
PyObject *func;
if (!PyArg_ParseTuple(args, "iO:createtimerhandler",
- &milliseconds, &func))
+ &milliseconds, &func)) {
goto exit;
+ }
return_value = _tkinter_tkapp_createtimerhandler_impl(self, milliseconds, func);
exit:
@@ -403,8 +415,9 @@ _tkinter_tkapp_mainloop(TkappObject *self, PyObject *args)
int threshold = 0;
if (!PyArg_ParseTuple(args, "|i:mainloop",
- &threshold))
+ &threshold)) {
goto exit;
+ }
return_value = _tkinter_tkapp_mainloop_impl(self, threshold);
exit:
@@ -429,8 +442,9 @@ _tkinter_tkapp_dooneevent(TkappObject *self, PyObject *args)
int flags = 0;
if (!PyArg_ParseTuple(args, "|i:dooneevent",
- &flags))
+ &flags)) {
goto exit;
+ }
return_value = _tkinter_tkapp_dooneevent_impl(self, flags);
exit:
@@ -551,8 +565,9 @@ _tkinter_create(PyModuleDef *module, PyObject *args)
const char *use = NULL;
if (!PyArg_ParseTuple(args, "|zssiiiiz:create",
- &screenName, &baseName, &className, &interactive, &wantobjects, &wantTk, &sync, &use))
+ &screenName, &baseName, &className, &interactive, &wantobjects, &wantTk, &sync, &use)) {
goto exit;
+ }
return_value = _tkinter_create_impl(module, screenName, baseName, className, interactive, wantobjects, wantTk, sync, use);
exit:
@@ -579,8 +594,9 @@ _tkinter_setbusywaitinterval(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
int new_val;
- if (!PyArg_Parse(arg, "i:setbusywaitinterval", &new_val))
+ if (!PyArg_Parse(arg, "i:setbusywaitinterval", &new_val)) {
goto exit;
+ }
return_value = _tkinter_setbusywaitinterval_impl(module, new_val);
exit:
@@ -606,8 +622,9 @@ _tkinter_getbusywaitinterval(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
int _return_value;
_return_value = _tkinter_getbusywaitinterval_impl(module);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong((long)_return_value);
exit:
@@ -621,4 +638,4 @@ exit:
#ifndef _TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF
#define _TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF
#endif /* !defined(_TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF) */
-/*[clinic end generated code: output=6dd667b91cf8addd input=a9049054013a1b77]*/
+/*[clinic end generated code: output=13be3f8313bba3c7 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_weakref.c.h b/Modules/clinic/_weakref.c.h
index 87c701c52f..b93343b079 100644
--- a/Modules/clinic/_weakref.c.h
+++ b/Modules/clinic/_weakref.c.h
@@ -21,11 +21,12 @@ _weakref_getweakrefcount(PyModuleDef *module, PyObject *object)
Py_ssize_t _return_value;
_return_value = _weakref_getweakrefcount_impl(module, object);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromSsize_t(_return_value);
exit:
return return_value;
}
-/*[clinic end generated code: output=4da9aade63eed77f input=a9049054013a1b77]*/
+/*[clinic end generated code: output=00e317cda5359ea3 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_winapi.c.h b/Modules/clinic/_winapi.c.h
index 34518e836b..2b8deeab2b 100644
--- a/Modules/clinic/_winapi.c.h
+++ b/Modules/clinic/_winapi.c.h
@@ -19,8 +19,9 @@ _winapi_Overlapped_GetOverlappedResult(OverlappedObject *self, PyObject *arg)
PyObject *return_value = NULL;
int wait;
- if (!PyArg_Parse(arg, "p:GetOverlappedResult", &wait))
+ if (!PyArg_Parse(arg, "p:GetOverlappedResult", &wait)) {
goto exit;
+ }
return_value = _winapi_Overlapped_GetOverlappedResult_impl(self, wait);
exit:
@@ -79,8 +80,9 @@ _winapi_CloseHandle(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
HANDLE handle;
- if (!PyArg_Parse(arg, "" F_HANDLE ":CloseHandle", &handle))
+ if (!PyArg_Parse(arg, "" F_HANDLE ":CloseHandle", &handle)) {
goto exit;
+ }
return_value = _winapi_CloseHandle_impl(module, handle);
exit:
@@ -108,8 +110,9 @@ _winapi_ConnectNamedPipe(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int use_overlapped = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "" F_HANDLE "|i:ConnectNamedPipe", _keywords,
- &handle, &use_overlapped))
+ &handle, &use_overlapped)) {
goto exit;
+ }
return_value = _winapi_ConnectNamedPipe_impl(module, handle, use_overlapped);
exit:
@@ -147,13 +150,16 @@ _winapi_CreateFile(PyModuleDef *module, PyObject *args)
HANDLE _return_value;
if (!PyArg_ParseTuple(args, "skk" F_POINTER "kk" F_HANDLE ":CreateFile",
- &file_name, &desired_access, &share_mode, &security_attributes, &creation_disposition, &flags_and_attributes, &template_file))
+ &file_name, &desired_access, &share_mode, &security_attributes, &creation_disposition, &flags_and_attributes, &template_file)) {
goto exit;
+ }
_return_value = _winapi_CreateFile_impl(module, file_name, desired_access, share_mode, security_attributes, creation_disposition, flags_and_attributes, template_file);
- if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred())
+ if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred()) {
goto exit;
- if (_return_value == NULL)
+ }
+ if (_return_value == NULL) {
Py_RETURN_NONE;
+ }
return_value = HANDLE_TO_PYNUM(_return_value);
exit:
@@ -180,8 +186,9 @@ _winapi_CreateJunction(PyModuleDef *module, PyObject *args)
LPWSTR dst_path;
if (!PyArg_ParseTuple(args, "uu:CreateJunction",
- &src_path, &dst_path))
+ &src_path, &dst_path)) {
goto exit;
+ }
return_value = _winapi_CreateJunction_impl(module, src_path, dst_path);
exit:
@@ -220,13 +227,16 @@ _winapi_CreateNamedPipe(PyModuleDef *module, PyObject *args)
HANDLE _return_value;
if (!PyArg_ParseTuple(args, "skkkkkk" F_POINTER ":CreateNamedPipe",
- &name, &open_mode, &pipe_mode, &max_instances, &out_buffer_size, &in_buffer_size, &default_timeout, &security_attributes))
+ &name, &open_mode, &pipe_mode, &max_instances, &out_buffer_size, &in_buffer_size, &default_timeout, &security_attributes)) {
goto exit;
+ }
_return_value = _winapi_CreateNamedPipe_impl(module, name, open_mode, pipe_mode, max_instances, out_buffer_size, in_buffer_size, default_timeout, security_attributes);
- if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred())
+ if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred()) {
goto exit;
- if (_return_value == NULL)
+ }
+ if (_return_value == NULL) {
Py_RETURN_NONE;
+ }
return_value = HANDLE_TO_PYNUM(_return_value);
exit:
@@ -259,8 +269,9 @@ _winapi_CreatePipe(PyModuleDef *module, PyObject *args)
DWORD size;
if (!PyArg_ParseTuple(args, "Ok:CreatePipe",
- &pipe_attrs, &size))
+ &pipe_attrs, &size)) {
goto exit;
+ }
return_value = _winapi_CreatePipe_impl(module, pipe_attrs, size);
exit:
@@ -309,8 +320,9 @@ _winapi_CreateProcess(PyModuleDef *module, PyObject *args)
PyObject *startup_info;
if (!PyArg_ParseTuple(args, "ZZOOikOZO:CreateProcess",
- &application_name, &command_line, &proc_attrs, &thread_attrs, &inherit_handles, &creation_flags, &env_mapping, &current_directory, &startup_info))
+ &application_name, &command_line, &proc_attrs, &thread_attrs, &inherit_handles, &creation_flags, &env_mapping, &current_directory, &startup_info)) {
goto exit;
+ }
return_value = _winapi_CreateProcess_impl(module, application_name, command_line, proc_attrs, thread_attrs, inherit_handles, creation_flags, env_mapping, current_directory, startup_info);
exit:
@@ -353,13 +365,16 @@ _winapi_DuplicateHandle(PyModuleDef *module, PyObject *args)
HANDLE _return_value;
if (!PyArg_ParseTuple(args, "" F_HANDLE "" F_HANDLE "" F_HANDLE "ki|k:DuplicateHandle",
- &source_process_handle, &source_handle, &target_process_handle, &desired_access, &inherit_handle, &options))
+ &source_process_handle, &source_handle, &target_process_handle, &desired_access, &inherit_handle, &options)) {
goto exit;
+ }
_return_value = _winapi_DuplicateHandle_impl(module, source_process_handle, source_handle, target_process_handle, desired_access, inherit_handle, options);
- if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred())
+ if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred()) {
goto exit;
- if (_return_value == NULL)
+ }
+ if (_return_value == NULL) {
Py_RETURN_NONE;
+ }
return_value = HANDLE_TO_PYNUM(_return_value);
exit:
@@ -383,8 +398,9 @@ _winapi_ExitProcess(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
UINT ExitCode;
- if (!PyArg_Parse(arg, "I:ExitProcess", &ExitCode))
+ if (!PyArg_Parse(arg, "I:ExitProcess", &ExitCode)) {
goto exit;
+ }
return_value = _winapi_ExitProcess_impl(module, ExitCode);
exit:
@@ -410,10 +426,12 @@ _winapi_GetCurrentProcess(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
HANDLE _return_value;
_return_value = _winapi_GetCurrentProcess_impl(module);
- if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred())
+ if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred()) {
goto exit;
- if (_return_value == NULL)
+ }
+ if (_return_value == NULL) {
Py_RETURN_NONE;
+ }
return_value = HANDLE_TO_PYNUM(_return_value);
exit:
@@ -439,11 +457,13 @@ _winapi_GetExitCodeProcess(PyModuleDef *module, PyObject *arg)
HANDLE process;
DWORD _return_value;
- if (!PyArg_Parse(arg, "" F_HANDLE ":GetExitCodeProcess", &process))
+ if (!PyArg_Parse(arg, "" F_HANDLE ":GetExitCodeProcess", &process)) {
goto exit;
+ }
_return_value = _winapi_GetExitCodeProcess_impl(module, process);
- if ((_return_value == DWORD_MAX) && PyErr_Occurred())
+ if ((_return_value == DWORD_MAX) && PyErr_Occurred()) {
goto exit;
+ }
return_value = Py_BuildValue("k", _return_value);
exit:
@@ -468,8 +488,9 @@ _winapi_GetLastError(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
DWORD _return_value;
_return_value = _winapi_GetLastError_impl(module);
- if ((_return_value == DWORD_MAX) && PyErr_Occurred())
+ if ((_return_value == DWORD_MAX) && PyErr_Occurred()) {
goto exit;
+ }
return_value = Py_BuildValue("k", _return_value);
exit:
@@ -501,8 +522,9 @@ _winapi_GetModuleFileName(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
HMODULE module_handle;
- if (!PyArg_Parse(arg, "" F_HANDLE ":GetModuleFileName", &module_handle))
+ if (!PyArg_Parse(arg, "" F_HANDLE ":GetModuleFileName", &module_handle)) {
goto exit;
+ }
return_value = _winapi_GetModuleFileName_impl(module, module_handle);
exit:
@@ -533,13 +555,16 @@ _winapi_GetStdHandle(PyModuleDef *module, PyObject *arg)
DWORD std_handle;
HANDLE _return_value;
- if (!PyArg_Parse(arg, "k:GetStdHandle", &std_handle))
+ if (!PyArg_Parse(arg, "k:GetStdHandle", &std_handle)) {
goto exit;
+ }
_return_value = _winapi_GetStdHandle_impl(module, std_handle);
- if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred())
+ if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred()) {
goto exit;
- if (_return_value == NULL)
+ }
+ if (_return_value == NULL) {
Py_RETURN_NONE;
+ }
return_value = HANDLE_TO_PYNUM(_return_value);
exit:
@@ -565,8 +590,9 @@ _winapi_GetVersion(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
long _return_value;
_return_value = _winapi_GetVersion_impl(module);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong(_return_value);
exit:
@@ -595,13 +621,16 @@ _winapi_OpenProcess(PyModuleDef *module, PyObject *args)
HANDLE _return_value;
if (!PyArg_ParseTuple(args, "kik:OpenProcess",
- &desired_access, &inherit_handle, &process_id))
+ &desired_access, &inherit_handle, &process_id)) {
goto exit;
+ }
_return_value = _winapi_OpenProcess_impl(module, desired_access, inherit_handle, process_id);
- if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred())
+ if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred()) {
goto exit;
- if (_return_value == NULL)
+ }
+ if (_return_value == NULL) {
Py_RETURN_NONE;
+ }
return_value = HANDLE_TO_PYNUM(_return_value);
exit:
@@ -627,8 +656,9 @@ _winapi_PeekNamedPipe(PyModuleDef *module, PyObject *args)
int size = 0;
if (!PyArg_ParseTuple(args, "" F_HANDLE "|i:PeekNamedPipe",
- &handle, &size))
+ &handle, &size)) {
goto exit;
+ }
return_value = _winapi_PeekNamedPipe_impl(module, handle, size);
exit:
@@ -657,8 +687,9 @@ _winapi_ReadFile(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int use_overlapped = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "" F_HANDLE "i|i:ReadFile", _keywords,
- &handle, &size, &use_overlapped))
+ &handle, &size, &use_overlapped)) {
goto exit;
+ }
return_value = _winapi_ReadFile_impl(module, handle, size, use_overlapped);
exit:
@@ -690,8 +721,9 @@ _winapi_SetNamedPipeHandleState(PyModuleDef *module, PyObject *args)
PyObject *collect_data_timeout;
if (!PyArg_ParseTuple(args, "" F_HANDLE "OOO:SetNamedPipeHandleState",
- &named_pipe, &mode, &max_collection_count, &collect_data_timeout))
+ &named_pipe, &mode, &max_collection_count, &collect_data_timeout)) {
goto exit;
+ }
return_value = _winapi_SetNamedPipeHandleState_impl(module, named_pipe, mode, max_collection_count, collect_data_timeout);
exit:
@@ -719,8 +751,9 @@ _winapi_TerminateProcess(PyModuleDef *module, PyObject *args)
UINT exit_code;
if (!PyArg_ParseTuple(args, "" F_HANDLE "I:TerminateProcess",
- &handle, &exit_code))
+ &handle, &exit_code)) {
goto exit;
+ }
return_value = _winapi_TerminateProcess_impl(module, handle, exit_code);
exit:
@@ -746,8 +779,9 @@ _winapi_WaitNamedPipe(PyModuleDef *module, PyObject *args)
DWORD timeout;
if (!PyArg_ParseTuple(args, "sk:WaitNamedPipe",
- &name, &timeout))
+ &name, &timeout)) {
goto exit;
+ }
return_value = _winapi_WaitNamedPipe_impl(module, name, timeout);
exit:
@@ -777,8 +811,9 @@ _winapi_WaitForMultipleObjects(PyModuleDef *module, PyObject *args)
DWORD milliseconds = INFINITE;
if (!PyArg_ParseTuple(args, "Oi|k:WaitForMultipleObjects",
- &handle_seq, &wait_flag, &milliseconds))
+ &handle_seq, &wait_flag, &milliseconds)) {
goto exit;
+ }
return_value = _winapi_WaitForMultipleObjects_impl(module, handle_seq, wait_flag, milliseconds);
exit:
@@ -811,11 +846,13 @@ _winapi_WaitForSingleObject(PyModuleDef *module, PyObject *args)
long _return_value;
if (!PyArg_ParseTuple(args, "" F_HANDLE "k:WaitForSingleObject",
- &handle, &milliseconds))
+ &handle, &milliseconds)) {
goto exit;
+ }
_return_value = _winapi_WaitForSingleObject_impl(module, handle, milliseconds);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong(_return_value);
exit:
@@ -844,11 +881,12 @@ _winapi_WriteFile(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int use_overlapped = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "" F_HANDLE "O|i:WriteFile", _keywords,
- &handle, &buffer, &use_overlapped))
+ &handle, &buffer, &use_overlapped)) {
goto exit;
+ }
return_value = _winapi_WriteFile_impl(module, handle, buffer, use_overlapped);
exit:
return return_value;
}
-/*[clinic end generated code: output=98771c6584056d19 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=d099ee4fbcdd5bc0 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/arraymodule.c.h b/Modules/clinic/arraymodule.c.h
index fdf247e2ca..ced17aaf88 100644
--- a/Modules/clinic/arraymodule.c.h
+++ b/Modules/clinic/arraymodule.c.h
@@ -77,8 +77,9 @@ array_array_pop(arrayobject *self, PyObject *args)
Py_ssize_t i = -1;
if (!PyArg_ParseTuple(args, "|n:pop",
- &i))
+ &i)) {
goto exit;
+ }
return_value = array_array_pop_impl(self, i);
exit:
@@ -114,8 +115,9 @@ array_array_insert(arrayobject *self, PyObject *args)
PyObject *v;
if (!PyArg_ParseTuple(args, "nO:insert",
- &i, &v))
+ &i, &v)) {
goto exit;
+ }
return_value = array_array_insert_impl(self, i, v);
exit:
@@ -211,8 +213,9 @@ array_array_fromfile(arrayobject *self, PyObject *args)
Py_ssize_t n;
if (!PyArg_ParseTuple(args, "On:fromfile",
- &f, &n))
+ &f, &n)) {
goto exit;
+ }
return_value = array_array_fromfile_impl(self, f, n);
exit:
@@ -275,14 +278,16 @@ array_array_fromstring(arrayobject *self, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer buffer = {NULL, NULL};
- if (!PyArg_Parse(arg, "s*:fromstring", &buffer))
+ if (!PyArg_Parse(arg, "s*:fromstring", &buffer)) {
goto exit;
+ }
return_value = array_array_fromstring_impl(self, &buffer);
exit:
/* Cleanup for buffer */
- if (buffer.obj)
+ if (buffer.obj) {
PyBuffer_Release(&buffer);
+ }
return return_value;
}
@@ -305,14 +310,16 @@ array_array_frombytes(arrayobject *self, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer buffer = {NULL, NULL};
- if (!PyArg_Parse(arg, "y*:frombytes", &buffer))
+ if (!PyArg_Parse(arg, "y*:frombytes", &buffer)) {
goto exit;
+ }
return_value = array_array_frombytes_impl(self, &buffer);
exit:
/* Cleanup for buffer */
- if (buffer.obj)
+ if (buffer.obj) {
PyBuffer_Release(&buffer);
+ }
return return_value;
}
@@ -379,8 +386,9 @@ array_array_fromunicode(arrayobject *self, PyObject *arg)
Py_UNICODE *ustr;
Py_ssize_clean_t ustr_length;
- if (!PyArg_Parse(arg, "u#:fromunicode", &ustr, &ustr_length))
+ if (!PyArg_Parse(arg, "u#:fromunicode", &ustr, &ustr_length)) {
goto exit;
+ }
return_value = array_array_fromunicode_impl(self, ustr, ustr_length);
exit:
@@ -453,8 +461,9 @@ array__array_reconstructor(PyModuleDef *module, PyObject *args)
PyObject *items;
if (!PyArg_ParseTuple(args, "OCiO:_array_reconstructor",
- &arraytype, &typecode, &mformat_code, &items))
+ &arraytype, &typecode, &mformat_code, &items)) {
goto exit;
+ }
return_value = array__array_reconstructor_impl(module, arraytype, typecode, mformat_code, items);
exit:
@@ -496,4 +505,4 @@ PyDoc_STRVAR(array_arrayiterator___setstate____doc__,
#define ARRAY_ARRAYITERATOR___SETSTATE___METHODDEF \
{"__setstate__", (PyCFunction)array_arrayiterator___setstate__, METH_O, array_arrayiterator___setstate____doc__},
-/*[clinic end generated code: output=d2e82c65ea841cfc input=a9049054013a1b77]*/
+/*[clinic end generated code: output=0b99c89275eda265 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/audioop.c.h b/Modules/clinic/audioop.c.h
index 3ee29666cc..4baba27cfd 100644
--- a/Modules/clinic/audioop.c.h
+++ b/Modules/clinic/audioop.c.h
@@ -24,14 +24,16 @@ audioop_getsample(PyModuleDef *module, PyObject *args)
Py_ssize_t index;
if (!PyArg_ParseTuple(args, "y*in:getsample",
- &fragment, &width, &index))
+ &fragment, &width, &index)) {
goto exit;
+ }
return_value = audioop_getsample_impl(module, &fragment, width, index);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -56,14 +58,16 @@ audioop_max(PyModuleDef *module, PyObject *args)
int width;
if (!PyArg_ParseTuple(args, "y*i:max",
- &fragment, &width))
+ &fragment, &width)) {
goto exit;
+ }
return_value = audioop_max_impl(module, &fragment, width);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -88,14 +92,16 @@ audioop_minmax(PyModuleDef *module, PyObject *args)
int width;
if (!PyArg_ParseTuple(args, "y*i:minmax",
- &fragment, &width))
+ &fragment, &width)) {
goto exit;
+ }
return_value = audioop_minmax_impl(module, &fragment, width);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -120,14 +126,16 @@ audioop_avg(PyModuleDef *module, PyObject *args)
int width;
if (!PyArg_ParseTuple(args, "y*i:avg",
- &fragment, &width))
+ &fragment, &width)) {
goto exit;
+ }
return_value = audioop_avg_impl(module, &fragment, width);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -152,14 +160,16 @@ audioop_rms(PyModuleDef *module, PyObject *args)
int width;
if (!PyArg_ParseTuple(args, "y*i:rms",
- &fragment, &width))
+ &fragment, &width)) {
goto exit;
+ }
return_value = audioop_rms_impl(module, &fragment, width);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -185,17 +195,20 @@ audioop_findfit(PyModuleDef *module, PyObject *args)
Py_buffer reference = {NULL, NULL};
if (!PyArg_ParseTuple(args, "y*y*:findfit",
- &fragment, &reference))
+ &fragment, &reference)) {
goto exit;
+ }
return_value = audioop_findfit_impl(module, &fragment, &reference);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
/* Cleanup for reference */
- if (reference.obj)
+ if (reference.obj) {
PyBuffer_Release(&reference);
+ }
return return_value;
}
@@ -221,17 +234,20 @@ audioop_findfactor(PyModuleDef *module, PyObject *args)
Py_buffer reference = {NULL, NULL};
if (!PyArg_ParseTuple(args, "y*y*:findfactor",
- &fragment, &reference))
+ &fragment, &reference)) {
goto exit;
+ }
return_value = audioop_findfactor_impl(module, &fragment, &reference);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
/* Cleanup for reference */
- if (reference.obj)
+ if (reference.obj) {
PyBuffer_Release(&reference);
+ }
return return_value;
}
@@ -257,14 +273,16 @@ audioop_findmax(PyModuleDef *module, PyObject *args)
Py_ssize_t length;
if (!PyArg_ParseTuple(args, "y*n:findmax",
- &fragment, &length))
+ &fragment, &length)) {
goto exit;
+ }
return_value = audioop_findmax_impl(module, &fragment, length);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -289,14 +307,16 @@ audioop_avgpp(PyModuleDef *module, PyObject *args)
int width;
if (!PyArg_ParseTuple(args, "y*i:avgpp",
- &fragment, &width))
+ &fragment, &width)) {
goto exit;
+ }
return_value = audioop_avgpp_impl(module, &fragment, width);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -321,14 +341,16 @@ audioop_maxpp(PyModuleDef *module, PyObject *args)
int width;
if (!PyArg_ParseTuple(args, "y*i:maxpp",
- &fragment, &width))
+ &fragment, &width)) {
goto exit;
+ }
return_value = audioop_maxpp_impl(module, &fragment, width);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -353,14 +375,16 @@ audioop_cross(PyModuleDef *module, PyObject *args)
int width;
if (!PyArg_ParseTuple(args, "y*i:cross",
- &fragment, &width))
+ &fragment, &width)) {
goto exit;
+ }
return_value = audioop_cross_impl(module, &fragment, width);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -387,14 +411,16 @@ audioop_mul(PyModuleDef *module, PyObject *args)
double factor;
if (!PyArg_ParseTuple(args, "y*id:mul",
- &fragment, &width, &factor))
+ &fragment, &width, &factor)) {
goto exit;
+ }
return_value = audioop_mul_impl(module, &fragment, width, factor);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -422,14 +448,16 @@ audioop_tomono(PyModuleDef *module, PyObject *args)
double rfactor;
if (!PyArg_ParseTuple(args, "y*idd:tomono",
- &fragment, &width, &lfactor, &rfactor))
+ &fragment, &width, &lfactor, &rfactor)) {
goto exit;
+ }
return_value = audioop_tomono_impl(module, &fragment, width, lfactor, rfactor);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -457,14 +485,16 @@ audioop_tostereo(PyModuleDef *module, PyObject *args)
double rfactor;
if (!PyArg_ParseTuple(args, "y*idd:tostereo",
- &fragment, &width, &lfactor, &rfactor))
+ &fragment, &width, &lfactor, &rfactor)) {
goto exit;
+ }
return_value = audioop_tostereo_impl(module, &fragment, width, lfactor, rfactor);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -491,17 +521,20 @@ audioop_add(PyModuleDef *module, PyObject *args)
int width;
if (!PyArg_ParseTuple(args, "y*y*i:add",
- &fragment1, &fragment2, &width))
+ &fragment1, &fragment2, &width)) {
goto exit;
+ }
return_value = audioop_add_impl(module, &fragment1, &fragment2, width);
exit:
/* Cleanup for fragment1 */
- if (fragment1.obj)
+ if (fragment1.obj) {
PyBuffer_Release(&fragment1);
+ }
/* Cleanup for fragment2 */
- if (fragment2.obj)
+ if (fragment2.obj) {
PyBuffer_Release(&fragment2);
+ }
return return_value;
}
@@ -528,14 +561,16 @@ audioop_bias(PyModuleDef *module, PyObject *args)
int bias;
if (!PyArg_ParseTuple(args, "y*ii:bias",
- &fragment, &width, &bias))
+ &fragment, &width, &bias)) {
goto exit;
+ }
return_value = audioop_bias_impl(module, &fragment, width, bias);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -560,14 +595,16 @@ audioop_reverse(PyModuleDef *module, PyObject *args)
int width;
if (!PyArg_ParseTuple(args, "y*i:reverse",
- &fragment, &width))
+ &fragment, &width)) {
goto exit;
+ }
return_value = audioop_reverse_impl(module, &fragment, width);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -592,14 +629,16 @@ audioop_byteswap(PyModuleDef *module, PyObject *args)
int width;
if (!PyArg_ParseTuple(args, "y*i:byteswap",
- &fragment, &width))
+ &fragment, &width)) {
goto exit;
+ }
return_value = audioop_byteswap_impl(module, &fragment, width);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -626,14 +665,16 @@ audioop_lin2lin(PyModuleDef *module, PyObject *args)
int newwidth;
if (!PyArg_ParseTuple(args, "y*ii:lin2lin",
- &fragment, &width, &newwidth))
+ &fragment, &width, &newwidth)) {
goto exit;
+ }
return_value = audioop_lin2lin_impl(module, &fragment, width, newwidth);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -667,14 +708,16 @@ audioop_ratecv(PyModuleDef *module, PyObject *args)
int weightB = 0;
if (!PyArg_ParseTuple(args, "y*iiiiO|ii:ratecv",
- &fragment, &width, &nchannels, &inrate, &outrate, &state, &weightA, &weightB))
+ &fragment, &width, &nchannels, &inrate, &outrate, &state, &weightA, &weightB)) {
goto exit;
+ }
return_value = audioop_ratecv_impl(module, &fragment, width, nchannels, inrate, outrate, state, weightA, weightB);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -699,14 +742,16 @@ audioop_lin2ulaw(PyModuleDef *module, PyObject *args)
int width;
if (!PyArg_ParseTuple(args, "y*i:lin2ulaw",
- &fragment, &width))
+ &fragment, &width)) {
goto exit;
+ }
return_value = audioop_lin2ulaw_impl(module, &fragment, width);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -731,14 +776,16 @@ audioop_ulaw2lin(PyModuleDef *module, PyObject *args)
int width;
if (!PyArg_ParseTuple(args, "y*i:ulaw2lin",
- &fragment, &width))
+ &fragment, &width)) {
goto exit;
+ }
return_value = audioop_ulaw2lin_impl(module, &fragment, width);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -763,14 +810,16 @@ audioop_lin2alaw(PyModuleDef *module, PyObject *args)
int width;
if (!PyArg_ParseTuple(args, "y*i:lin2alaw",
- &fragment, &width))
+ &fragment, &width)) {
goto exit;
+ }
return_value = audioop_lin2alaw_impl(module, &fragment, width);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -795,14 +844,16 @@ audioop_alaw2lin(PyModuleDef *module, PyObject *args)
int width;
if (!PyArg_ParseTuple(args, "y*i:alaw2lin",
- &fragment, &width))
+ &fragment, &width)) {
goto exit;
+ }
return_value = audioop_alaw2lin_impl(module, &fragment, width);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -829,14 +880,16 @@ audioop_lin2adpcm(PyModuleDef *module, PyObject *args)
PyObject *state;
if (!PyArg_ParseTuple(args, "y*iO:lin2adpcm",
- &fragment, &width, &state))
+ &fragment, &width, &state)) {
goto exit;
+ }
return_value = audioop_lin2adpcm_impl(module, &fragment, width, state);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
@@ -863,15 +916,17 @@ audioop_adpcm2lin(PyModuleDef *module, PyObject *args)
PyObject *state;
if (!PyArg_ParseTuple(args, "y*iO:adpcm2lin",
- &fragment, &width, &state))
+ &fragment, &width, &state)) {
goto exit;
+ }
return_value = audioop_adpcm2lin_impl(module, &fragment, width, state);
exit:
/* Cleanup for fragment */
- if (fragment.obj)
+ if (fragment.obj) {
PyBuffer_Release(&fragment);
+ }
return return_value;
}
-/*[clinic end generated code: output=a076e1b213a8727b input=a9049054013a1b77]*/
+/*[clinic end generated code: output=af5b025f0241fee2 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/binascii.c.h b/Modules/clinic/binascii.c.h
index 46cfb8ec3d..e297f1d53e 100644
--- a/Modules/clinic/binascii.c.h
+++ b/Modules/clinic/binascii.c.h
@@ -20,8 +20,9 @@ binascii_a2b_uu(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_Parse(arg, "O&:a2b_uu", ascii_buffer_converter, &data))
+ if (!PyArg_Parse(arg, "O&:a2b_uu", ascii_buffer_converter, &data)) {
goto exit;
+ }
return_value = binascii_a2b_uu_impl(module, &data);
exit:
@@ -50,14 +51,16 @@ binascii_b2a_uu(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_Parse(arg, "y*:b2a_uu", &data))
+ if (!PyArg_Parse(arg, "y*:b2a_uu", &data)) {
goto exit;
+ }
return_value = binascii_b2a_uu_impl(module, &data);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -80,8 +83,9 @@ binascii_a2b_base64(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_Parse(arg, "O&:a2b_base64", ascii_buffer_converter, &data))
+ if (!PyArg_Parse(arg, "O&:a2b_base64", ascii_buffer_converter, &data)) {
goto exit;
+ }
return_value = binascii_a2b_base64_impl(module, &data);
exit:
@@ -113,14 +117,16 @@ binascii_b2a_base64(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int newline = 1;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|$i:b2a_base64", _keywords,
- &data, &newline))
+ &data, &newline)) {
goto exit;
+ }
return_value = binascii_b2a_base64_impl(module, &data, newline);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -143,8 +149,9 @@ binascii_a2b_hqx(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_Parse(arg, "O&:a2b_hqx", ascii_buffer_converter, &data))
+ if (!PyArg_Parse(arg, "O&:a2b_hqx", ascii_buffer_converter, &data)) {
goto exit;
+ }
return_value = binascii_a2b_hqx_impl(module, &data);
exit:
@@ -173,14 +180,16 @@ binascii_rlecode_hqx(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_Parse(arg, "y*:rlecode_hqx", &data))
+ if (!PyArg_Parse(arg, "y*:rlecode_hqx", &data)) {
goto exit;
+ }
return_value = binascii_rlecode_hqx_impl(module, &data);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -203,14 +212,16 @@ binascii_b2a_hqx(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_Parse(arg, "y*:b2a_hqx", &data))
+ if (!PyArg_Parse(arg, "y*:b2a_hqx", &data)) {
goto exit;
+ }
return_value = binascii_b2a_hqx_impl(module, &data);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -233,14 +244,16 @@ binascii_rledecode_hqx(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_Parse(arg, "y*:rledecode_hqx", &data))
+ if (!PyArg_Parse(arg, "y*:rledecode_hqx", &data)) {
goto exit;
+ }
return_value = binascii_rledecode_hqx_impl(module, &data);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -266,17 +279,20 @@ binascii_crc_hqx(PyModuleDef *module, PyObject *args)
unsigned int _return_value;
if (!PyArg_ParseTuple(args, "y*I:crc_hqx",
- &data, &crc))
+ &data, &crc)) {
goto exit;
+ }
_return_value = binascii_crc_hqx_impl(module, &data, crc);
- if ((_return_value == (unsigned int)-1) && PyErr_Occurred())
+ if ((_return_value == (unsigned int)-1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromUnsignedLong((unsigned long)_return_value);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -302,17 +318,20 @@ binascii_crc32(PyModuleDef *module, PyObject *args)
unsigned int _return_value;
if (!PyArg_ParseTuple(args, "y*|I:crc32",
- &data, &crc))
+ &data, &crc)) {
goto exit;
+ }
_return_value = binascii_crc32_impl(module, &data, crc);
- if ((_return_value == (unsigned int)-1) && PyErr_Occurred())
+ if ((_return_value == (unsigned int)-1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromUnsignedLong((unsigned long)_return_value);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -338,14 +357,16 @@ binascii_b2a_hex(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_Parse(arg, "y*:b2a_hex", &data))
+ if (!PyArg_Parse(arg, "y*:b2a_hex", &data)) {
goto exit;
+ }
return_value = binascii_b2a_hex_impl(module, &data);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -370,14 +391,16 @@ binascii_hexlify(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_Parse(arg, "y*:hexlify", &data))
+ if (!PyArg_Parse(arg, "y*:hexlify", &data)) {
goto exit;
+ }
return_value = binascii_hexlify_impl(module, &data);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -403,8 +426,9 @@ binascii_a2b_hex(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer hexstr = {NULL, NULL};
- if (!PyArg_Parse(arg, "O&:a2b_hex", ascii_buffer_converter, &hexstr))
+ if (!PyArg_Parse(arg, "O&:a2b_hex", ascii_buffer_converter, &hexstr)) {
goto exit;
+ }
return_value = binascii_a2b_hex_impl(module, &hexstr);
exit:
@@ -435,8 +459,9 @@ binascii_unhexlify(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
Py_buffer hexstr = {NULL, NULL};
- if (!PyArg_Parse(arg, "O&:unhexlify", ascii_buffer_converter, &hexstr))
+ if (!PyArg_Parse(arg, "O&:unhexlify", ascii_buffer_converter, &hexstr)) {
goto exit;
+ }
return_value = binascii_unhexlify_impl(module, &hexstr);
exit:
@@ -468,8 +493,9 @@ binascii_a2b_qp(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int header = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|i:a2b_qp", _keywords,
- ascii_buffer_converter, &data, &header))
+ ascii_buffer_converter, &data, &header)) {
goto exit;
+ }
return_value = binascii_a2b_qp_impl(module, &data, header);
exit:
@@ -508,15 +534,17 @@ binascii_b2a_qp(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int header = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|iii:b2a_qp", _keywords,
- &data, &quotetabs, &istext, &header))
+ &data, &quotetabs, &istext, &header)) {
goto exit;
+ }
return_value = binascii_b2a_qp_impl(module, &data, quotetabs, istext, header);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
-/*[clinic end generated code: output=b15a24350d105251 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=7fb420392d78ac4d input=a9049054013a1b77]*/
diff --git a/Modules/clinic/cmathmodule.c.h b/Modules/clinic/cmathmodule.c.h
index 7d61649783..5899348c87 100644
--- a/Modules/clinic/cmathmodule.c.h
+++ b/Modules/clinic/cmathmodule.c.h
@@ -21,8 +21,9 @@ cmath_acos(PyModuleDef *module, PyObject *arg)
Py_complex z;
Py_complex _return_value;
- if (!PyArg_Parse(arg, "D:acos", &z))
+ if (!PyArg_Parse(arg, "D:acos", &z)) {
goto exit;
+ }
/* modifications for z */
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
_return_value = cmath_acos_impl(module, z);
@@ -62,8 +63,9 @@ cmath_acosh(PyModuleDef *module, PyObject *arg)
Py_complex z;
Py_complex _return_value;
- if (!PyArg_Parse(arg, "D:acosh", &z))
+ if (!PyArg_Parse(arg, "D:acosh", &z)) {
goto exit;
+ }
/* modifications for z */
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
_return_value = cmath_acosh_impl(module, z);
@@ -103,8 +105,9 @@ cmath_asin(PyModuleDef *module, PyObject *arg)
Py_complex z;
Py_complex _return_value;
- if (!PyArg_Parse(arg, "D:asin", &z))
+ if (!PyArg_Parse(arg, "D:asin", &z)) {
goto exit;
+ }
/* modifications for z */
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
_return_value = cmath_asin_impl(module, z);
@@ -144,8 +147,9 @@ cmath_asinh(PyModuleDef *module, PyObject *arg)
Py_complex z;
Py_complex _return_value;
- if (!PyArg_Parse(arg, "D:asinh", &z))
+ if (!PyArg_Parse(arg, "D:asinh", &z)) {
goto exit;
+ }
/* modifications for z */
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
_return_value = cmath_asinh_impl(module, z);
@@ -185,8 +189,9 @@ cmath_atan(PyModuleDef *module, PyObject *arg)
Py_complex z;
Py_complex _return_value;
- if (!PyArg_Parse(arg, "D:atan", &z))
+ if (!PyArg_Parse(arg, "D:atan", &z)) {
goto exit;
+ }
/* modifications for z */
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
_return_value = cmath_atan_impl(module, z);
@@ -226,8 +231,9 @@ cmath_atanh(PyModuleDef *module, PyObject *arg)
Py_complex z;
Py_complex _return_value;
- if (!PyArg_Parse(arg, "D:atanh", &z))
+ if (!PyArg_Parse(arg, "D:atanh", &z)) {
goto exit;
+ }
/* modifications for z */
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
_return_value = cmath_atanh_impl(module, z);
@@ -267,8 +273,9 @@ cmath_cos(PyModuleDef *module, PyObject *arg)
Py_complex z;
Py_complex _return_value;
- if (!PyArg_Parse(arg, "D:cos", &z))
+ if (!PyArg_Parse(arg, "D:cos", &z)) {
goto exit;
+ }
/* modifications for z */
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
_return_value = cmath_cos_impl(module, z);
@@ -308,8 +315,9 @@ cmath_cosh(PyModuleDef *module, PyObject *arg)
Py_complex z;
Py_complex _return_value;
- if (!PyArg_Parse(arg, "D:cosh", &z))
+ if (!PyArg_Parse(arg, "D:cosh", &z)) {
goto exit;
+ }
/* modifications for z */
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
_return_value = cmath_cosh_impl(module, z);
@@ -349,8 +357,9 @@ cmath_exp(PyModuleDef *module, PyObject *arg)
Py_complex z;
Py_complex _return_value;
- if (!PyArg_Parse(arg, "D:exp", &z))
+ if (!PyArg_Parse(arg, "D:exp", &z)) {
goto exit;
+ }
/* modifications for z */
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
_return_value = cmath_exp_impl(module, z);
@@ -390,8 +399,9 @@ cmath_log10(PyModuleDef *module, PyObject *arg)
Py_complex z;
Py_complex _return_value;
- if (!PyArg_Parse(arg, "D:log10", &z))
+ if (!PyArg_Parse(arg, "D:log10", &z)) {
goto exit;
+ }
/* modifications for z */
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
_return_value = cmath_log10_impl(module, z);
@@ -431,8 +441,9 @@ cmath_sin(PyModuleDef *module, PyObject *arg)
Py_complex z;
Py_complex _return_value;
- if (!PyArg_Parse(arg, "D:sin", &z))
+ if (!PyArg_Parse(arg, "D:sin", &z)) {
goto exit;
+ }
/* modifications for z */
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
_return_value = cmath_sin_impl(module, z);
@@ -472,8 +483,9 @@ cmath_sinh(PyModuleDef *module, PyObject *arg)
Py_complex z;
Py_complex _return_value;
- if (!PyArg_Parse(arg, "D:sinh", &z))
+ if (!PyArg_Parse(arg, "D:sinh", &z)) {
goto exit;
+ }
/* modifications for z */
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
_return_value = cmath_sinh_impl(module, z);
@@ -513,8 +525,9 @@ cmath_sqrt(PyModuleDef *module, PyObject *arg)
Py_complex z;
Py_complex _return_value;
- if (!PyArg_Parse(arg, "D:sqrt", &z))
+ if (!PyArg_Parse(arg, "D:sqrt", &z)) {
goto exit;
+ }
/* modifications for z */
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
_return_value = cmath_sqrt_impl(module, z);
@@ -554,8 +567,9 @@ cmath_tan(PyModuleDef *module, PyObject *arg)
Py_complex z;
Py_complex _return_value;
- if (!PyArg_Parse(arg, "D:tan", &z))
+ if (!PyArg_Parse(arg, "D:tan", &z)) {
goto exit;
+ }
/* modifications for z */
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
_return_value = cmath_tan_impl(module, z);
@@ -595,8 +609,9 @@ cmath_tanh(PyModuleDef *module, PyObject *arg)
Py_complex z;
Py_complex _return_value;
- if (!PyArg_Parse(arg, "D:tanh", &z))
+ if (!PyArg_Parse(arg, "D:tanh", &z)) {
goto exit;
+ }
/* modifications for z */
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
_return_value = cmath_tanh_impl(module, z);
@@ -639,8 +654,9 @@ cmath_log(PyModuleDef *module, PyObject *args)
PyObject *y_obj = NULL;
if (!PyArg_ParseTuple(args, "D|O:log",
- &x, &y_obj))
+ &x, &y_obj)) {
goto exit;
+ }
return_value = cmath_log_impl(module, x, y_obj);
exit:
@@ -665,8 +681,9 @@ cmath_phase(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
Py_complex z;
- if (!PyArg_Parse(arg, "D:phase", &z))
+ if (!PyArg_Parse(arg, "D:phase", &z)) {
goto exit;
+ }
return_value = cmath_phase_impl(module, z);
exit:
@@ -693,8 +710,9 @@ cmath_polar(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
Py_complex z;
- if (!PyArg_Parse(arg, "D:polar", &z))
+ if (!PyArg_Parse(arg, "D:polar", &z)) {
goto exit;
+ }
return_value = cmath_polar_impl(module, z);
exit:
@@ -721,8 +739,9 @@ cmath_rect(PyModuleDef *module, PyObject *args)
double phi;
if (!PyArg_ParseTuple(args, "dd:rect",
- &r, &phi))
+ &r, &phi)) {
goto exit;
+ }
return_value = cmath_rect_impl(module, r, phi);
exit:
@@ -747,8 +766,9 @@ cmath_isfinite(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
Py_complex z;
- if (!PyArg_Parse(arg, "D:isfinite", &z))
+ if (!PyArg_Parse(arg, "D:isfinite", &z)) {
goto exit;
+ }
return_value = cmath_isfinite_impl(module, z);
exit:
@@ -773,8 +793,9 @@ cmath_isnan(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
Py_complex z;
- if (!PyArg_Parse(arg, "D:isnan", &z))
+ if (!PyArg_Parse(arg, "D:isnan", &z)) {
goto exit;
+ }
return_value = cmath_isnan_impl(module, z);
exit:
@@ -799,8 +820,9 @@ cmath_isinf(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
Py_complex z;
- if (!PyArg_Parse(arg, "D:isinf", &z))
+ if (!PyArg_Parse(arg, "D:isinf", &z)) {
goto exit;
+ }
return_value = cmath_isinf_impl(module, z);
exit:
@@ -847,14 +869,16 @@ cmath_isclose(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int _return_value;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "DD|$dd:isclose", _keywords,
- &a, &b, &rel_tol, &abs_tol))
+ &a, &b, &rel_tol, &abs_tol)) {
goto exit;
+ }
_return_value = cmath_isclose_impl(module, a, b, rel_tol, abs_tol);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyBool_FromLong((long)_return_value);
exit:
return return_value;
}
-/*[clinic end generated code: output=229e9c48c9d27362 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=f166205b4beb1826 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/fcntlmodule.c.h b/Modules/clinic/fcntlmodule.c.h
index d9a151797e..104b4823f9 100644
--- a/Modules/clinic/fcntlmodule.c.h
+++ b/Modules/clinic/fcntlmodule.c.h
@@ -33,8 +33,9 @@ fcntl_fcntl(PyModuleDef *module, PyObject *args)
PyObject *arg = NULL;
if (!PyArg_ParseTuple(args, "O&i|O:fcntl",
- conv_descriptor, &fd, &code, &arg))
+ conv_descriptor, &fd, &code, &arg)) {
goto exit;
+ }
return_value = fcntl_fcntl_impl(module, fd, code, arg);
exit:
@@ -91,8 +92,9 @@ fcntl_ioctl(PyModuleDef *module, PyObject *args)
int mutate_arg = 1;
if (!PyArg_ParseTuple(args, "O&I|Op:ioctl",
- conv_descriptor, &fd, &code, &ob_arg, &mutate_arg))
+ conv_descriptor, &fd, &code, &ob_arg, &mutate_arg)) {
goto exit;
+ }
return_value = fcntl_ioctl_impl(module, fd, code, ob_arg, mutate_arg);
exit:
@@ -122,8 +124,9 @@ fcntl_flock(PyModuleDef *module, PyObject *args)
int code;
if (!PyArg_ParseTuple(args, "O&i:flock",
- conv_descriptor, &fd, &code))
+ conv_descriptor, &fd, &code)) {
goto exit;
+ }
return_value = fcntl_flock_impl(module, fd, code);
exit:
@@ -175,11 +178,12 @@ fcntl_lockf(PyModuleDef *module, PyObject *args)
int whence = 0;
if (!PyArg_ParseTuple(args, "O&i|OOi:lockf",
- conv_descriptor, &fd, &code, &lenobj, &startobj, &whence))
+ conv_descriptor, &fd, &code, &lenobj, &startobj, &whence)) {
goto exit;
+ }
return_value = fcntl_lockf_impl(module, fd, code, lenobj, startobj, whence);
exit:
return return_value;
}
-/*[clinic end generated code: output=b7d6e8fc2ad09c48 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b08537e9adc04ca2 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/grpmodule.c.h b/Modules/clinic/grpmodule.c.h
index eb5b59d29b..cd111aa4d6 100644
--- a/Modules/clinic/grpmodule.c.h
+++ b/Modules/clinic/grpmodule.c.h
@@ -24,8 +24,9 @@ grp_getgrgid(PyModuleDef *module, PyObject *args, PyObject *kwargs)
PyObject *id;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:getgrgid", _keywords,
- &id))
+ &id)) {
goto exit;
+ }
return_value = grp_getgrgid_impl(module, id);
exit:
@@ -54,8 +55,9 @@ grp_getgrnam(PyModuleDef *module, PyObject *args, PyObject *kwargs)
PyObject *name;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "U:getgrnam", _keywords,
- &name))
+ &name)) {
goto exit;
+ }
return_value = grp_getgrnam_impl(module, name);
exit:
@@ -82,4 +84,4 @@ grp_getgrall(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
{
return grp_getgrall_impl(module);
}
-/*[clinic end generated code: output=5191c25600afb1bd input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a8a097520206ccd6 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/md5module.c.h b/Modules/clinic/md5module.c.h
index f5a3117f10..9c8987eb5e 100644
--- a/Modules/clinic/md5module.c.h
+++ b/Modules/clinic/md5module.c.h
@@ -85,11 +85,12 @@ _md5_md5(PyModuleDef *module, PyObject *args, PyObject *kwargs)
PyObject *string = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:md5", _keywords,
- &string))
+ &string)) {
goto exit;
+ }
return_value = _md5_md5_impl(module, string);
exit:
return return_value;
}
-/*[clinic end generated code: output=0f803ded701aca54 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=d701d041d387b081 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h
index 2758d48cf0..158f94b73b 100644
--- a/Modules/clinic/posixmodule.c.h
+++ b/Modules/clinic/posixmodule.c.h
@@ -43,8 +43,9 @@ os_stat(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int follow_symlinks = 1;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|$O&p:stat", _keywords,
- path_converter, &path, FSTATAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks))
+ path_converter, &path, FSTATAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks)) {
goto exit;
+ }
return_value = os_stat_impl(module, &path, dir_fd, follow_symlinks);
exit:
@@ -78,8 +79,9 @@ os_lstat(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int dir_fd = DEFAULT_DIR_FD;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|$O&:lstat", _keywords,
- path_converter, &path, FSTATAT_DIR_FD_CONVERTER, &dir_fd))
+ path_converter, &path, FSTATAT_DIR_FD_CONVERTER, &dir_fd)) {
goto exit;
+ }
return_value = os_lstat_impl(module, &path, dir_fd);
exit:
@@ -141,11 +143,13 @@ os_access(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int _return_value;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&i|$O&pp:access", _keywords,
- path_converter, &path, &mode, FACCESSAT_DIR_FD_CONVERTER, &dir_fd, &effective_ids, &follow_symlinks))
+ path_converter, &path, &mode, FACCESSAT_DIR_FD_CONVERTER, &dir_fd, &effective_ids, &follow_symlinks)) {
goto exit;
+ }
_return_value = os_access_impl(module, &path, mode, dir_fd, effective_ids, follow_symlinks);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyBool_FromLong((long)_return_value);
exit:
@@ -179,11 +183,13 @@ os_ttyname(PyModuleDef *module, PyObject *arg)
int fd;
char *_return_value;
- if (!PyArg_Parse(arg, "i:ttyname", &fd))
+ if (!PyArg_Parse(arg, "i:ttyname", &fd)) {
goto exit;
+ }
_return_value = os_ttyname_impl(module, fd);
- if (_return_value == NULL)
+ if (_return_value == NULL) {
goto exit;
+ }
return_value = PyUnicode_DecodeFSDefault(_return_value);
exit:
@@ -238,8 +244,9 @@ os_chdir(PyModuleDef *module, PyObject *args, PyObject *kwargs)
path_t path = PATH_T_INITIALIZE("chdir", "path", 0, PATH_HAVE_FCHDIR);
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&:chdir", _keywords,
- path_converter, &path))
+ path_converter, &path)) {
goto exit;
+ }
return_value = os_chdir_impl(module, &path);
exit:
@@ -274,8 +281,9 @@ os_fchdir(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int fd;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&:fchdir", _keywords,
- fildes_converter, &fd))
+ fildes_converter, &fd)) {
goto exit;
+ }
return_value = os_fchdir_impl(module, fd);
exit:
@@ -328,8 +336,9 @@ os_chmod(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int follow_symlinks = 1;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&i|$O&p:chmod", _keywords,
- path_converter, &path, &mode, FCHMODAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks))
+ path_converter, &path, &mode, FCHMODAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks)) {
goto exit;
+ }
return_value = os_chmod_impl(module, &path, mode, dir_fd, follow_symlinks);
exit:
@@ -364,8 +373,9 @@ os_fchmod(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int mode;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:fchmod", _keywords,
- &fd, &mode))
+ &fd, &mode)) {
goto exit;
+ }
return_value = os_fchmod_impl(module, fd, mode);
exit:
@@ -400,8 +410,9 @@ os_lchmod(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int mode;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&i:lchmod", _keywords,
- path_converter, &path, &mode))
+ path_converter, &path, &mode)) {
goto exit;
+ }
return_value = os_lchmod_impl(module, &path, mode);
exit:
@@ -444,8 +455,9 @@ os_chflags(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int follow_symlinks = 1;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&k|p:chflags", _keywords,
- path_converter, &path, &flags, &follow_symlinks))
+ path_converter, &path, &flags, &follow_symlinks)) {
goto exit;
+ }
return_value = os_chflags_impl(module, &path, flags, follow_symlinks);
exit:
@@ -483,8 +495,9 @@ os_lchflags(PyModuleDef *module, PyObject *args, PyObject *kwargs)
unsigned long flags;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&k:lchflags", _keywords,
- path_converter, &path, &flags))
+ path_converter, &path, &flags)) {
goto exit;
+ }
return_value = os_lchflags_impl(module, &path, flags);
exit:
@@ -518,8 +531,9 @@ os_chroot(PyModuleDef *module, PyObject *args, PyObject *kwargs)
path_t path = PATH_T_INITIALIZE("chroot", "path", 0, 0);
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&:chroot", _keywords,
- path_converter, &path))
+ path_converter, &path)) {
goto exit;
+ }
return_value = os_chroot_impl(module, &path);
exit:
@@ -553,8 +567,9 @@ os_fsync(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int fd;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&:fsync", _keywords,
- fildes_converter, &fd))
+ fildes_converter, &fd)) {
goto exit;
+ }
return_value = os_fsync_impl(module, fd);
exit:
@@ -607,8 +622,9 @@ os_fdatasync(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int fd;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&:fdatasync", _keywords,
- fildes_converter, &fd))
+ fildes_converter, &fd)) {
goto exit;
+ }
return_value = os_fdatasync_impl(module, fd);
exit:
@@ -668,8 +684,9 @@ os_chown(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int follow_symlinks = 1;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&O&|$O&p:chown", _keywords,
- path_converter, &path, _Py_Uid_Converter, &uid, _Py_Gid_Converter, &gid, FCHOWNAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks))
+ path_converter, &path, _Py_Uid_Converter, &uid, _Py_Gid_Converter, &gid, FCHOWNAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks)) {
goto exit;
+ }
return_value = os_chown_impl(module, &path, uid, gid, dir_fd, follow_symlinks);
exit:
@@ -707,8 +724,9 @@ os_fchown(PyModuleDef *module, PyObject *args, PyObject *kwargs)
gid_t gid;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iO&O&:fchown", _keywords,
- &fd, _Py_Uid_Converter, &uid, _Py_Gid_Converter, &gid))
+ &fd, _Py_Uid_Converter, &uid, _Py_Gid_Converter, &gid)) {
goto exit;
+ }
return_value = os_fchown_impl(module, fd, uid, gid);
exit:
@@ -744,8 +762,9 @@ os_lchown(PyModuleDef *module, PyObject *args, PyObject *kwargs)
gid_t gid;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&O&:lchown", _keywords,
- path_converter, &path, _Py_Uid_Converter, &uid, _Py_Gid_Converter, &gid))
+ path_converter, &path, _Py_Uid_Converter, &uid, _Py_Gid_Converter, &gid)) {
goto exit;
+ }
return_value = os_lchown_impl(module, &path, uid, gid);
exit:
@@ -831,8 +850,9 @@ os_link(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int follow_symlinks = 1;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&|$O&O&p:link", _keywords,
- path_converter, &src, path_converter, &dst, dir_fd_converter, &src_dir_fd, dir_fd_converter, &dst_dir_fd, &follow_symlinks))
+ path_converter, &src, path_converter, &dst, dir_fd_converter, &src_dir_fd, dir_fd_converter, &dst_dir_fd, &follow_symlinks)) {
goto exit;
+ }
return_value = os_link_impl(module, &src, &dst, src_dir_fd, dst_dir_fd, follow_symlinks);
exit:
@@ -877,8 +897,9 @@ os_listdir(PyModuleDef *module, PyObject *args, PyObject *kwargs)
path_t path = PATH_T_INITIALIZE("listdir", "path", 1, PATH_HAVE_FDOPENDIR);
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O&:listdir", _keywords,
- path_converter, &path))
+ path_converter, &path)) {
goto exit;
+ }
return_value = os_listdir_impl(module, &path);
exit:
@@ -907,8 +928,9 @@ os__getfullpathname(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
path_t path = PATH_T_INITIALIZE("_getfullpathname", "path", 0, 0);
- if (!PyArg_Parse(arg, "O&:_getfullpathname", path_converter, &path))
+ if (!PyArg_Parse(arg, "O&:_getfullpathname", path_converter, &path)) {
goto exit;
+ }
return_value = os__getfullpathname_impl(module, &path);
exit:
@@ -940,8 +962,9 @@ os__getfinalpathname(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
PyObject *path;
- if (!PyArg_Parse(arg, "U:_getfinalpathname", &path))
+ if (!PyArg_Parse(arg, "U:_getfinalpathname", &path)) {
goto exit;
+ }
return_value = os__getfinalpathname_impl(module, path);
exit:
@@ -969,8 +992,9 @@ os__isdir(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
path_t path = PATH_T_INITIALIZE("_isdir", "path", 0, 0);
- if (!PyArg_Parse(arg, "O&:_isdir", path_converter, &path))
+ if (!PyArg_Parse(arg, "O&:_isdir", path_converter, &path)) {
goto exit;
+ }
return_value = os__isdir_impl(module, &path);
exit:
@@ -1004,8 +1028,9 @@ os__getvolumepathname(PyModuleDef *module, PyObject *args, PyObject *kwargs)
PyObject *path;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "U:_getvolumepathname", _keywords,
- &path))
+ &path)) {
goto exit;
+ }
return_value = os__getvolumepathname_impl(module, path);
exit:
@@ -1043,8 +1068,9 @@ os_mkdir(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int dir_fd = DEFAULT_DIR_FD;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|i$O&:mkdir", _keywords,
- path_converter, &path, &mode, MKDIRAT_DIR_FD_CONVERTER, &dir_fd))
+ path_converter, &path, &mode, MKDIRAT_DIR_FD_CONVERTER, &dir_fd)) {
goto exit;
+ }
return_value = os_mkdir_impl(module, &path, mode, dir_fd);
exit:
@@ -1074,8 +1100,9 @@ os_nice(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
int increment;
- if (!PyArg_Parse(arg, "i:nice", &increment))
+ if (!PyArg_Parse(arg, "i:nice", &increment)) {
goto exit;
+ }
return_value = os_nice_impl(module, increment);
exit:
@@ -1107,8 +1134,9 @@ os_getpriority(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int who;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:getpriority", _keywords,
- &which, &who))
+ &which, &who)) {
goto exit;
+ }
return_value = os_getpriority_impl(module, which, who);
exit:
@@ -1141,8 +1169,9 @@ os_setpriority(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int priority;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iii:setpriority", _keywords,
- &which, &who, &priority))
+ &which, &who, &priority)) {
goto exit;
+ }
return_value = os_setpriority_impl(module, which, who, priority);
exit:
@@ -1181,8 +1210,9 @@ os_rename(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int dst_dir_fd = DEFAULT_DIR_FD;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&|$O&O&:rename", _keywords,
- path_converter, &src, path_converter, &dst, dir_fd_converter, &src_dir_fd, dir_fd_converter, &dst_dir_fd))
+ path_converter, &src, path_converter, &dst, dir_fd_converter, &src_dir_fd, dir_fd_converter, &dst_dir_fd)) {
goto exit;
+ }
return_value = os_rename_impl(module, &src, &dst, src_dir_fd, dst_dir_fd);
exit:
@@ -1224,8 +1254,9 @@ os_replace(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int dst_dir_fd = DEFAULT_DIR_FD;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&|$O&O&:replace", _keywords,
- path_converter, &src, path_converter, &dst, dir_fd_converter, &src_dir_fd, dir_fd_converter, &dst_dir_fd))
+ path_converter, &src, path_converter, &dst, dir_fd_converter, &src_dir_fd, dir_fd_converter, &dst_dir_fd)) {
goto exit;
+ }
return_value = os_replace_impl(module, &src, &dst, src_dir_fd, dst_dir_fd);
exit:
@@ -1263,8 +1294,9 @@ os_rmdir(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int dir_fd = DEFAULT_DIR_FD;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|$O&:rmdir", _keywords,
- path_converter, &path, UNLINKAT_DIR_FD_CONVERTER, &dir_fd))
+ path_converter, &path, UNLINKAT_DIR_FD_CONVERTER, &dir_fd)) {
goto exit;
+ }
return_value = os_rmdir_impl(module, &path, dir_fd);
exit:
@@ -1297,11 +1329,13 @@ os_system(PyModuleDef *module, PyObject *args, PyObject *kwargs)
long _return_value;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "u:system", _keywords,
- &command))
+ &command)) {
goto exit;
+ }
_return_value = os_system_impl(module, command);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong(_return_value);
exit:
@@ -1333,11 +1367,13 @@ os_system(PyModuleDef *module, PyObject *args, PyObject *kwargs)
long _return_value;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&:system", _keywords,
- PyUnicode_FSConverter, &command))
+ PyUnicode_FSConverter, &command)) {
goto exit;
+ }
_return_value = os_system_impl(module, command);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong(_return_value);
exit:
@@ -1367,8 +1403,9 @@ os_umask(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
int mask;
- if (!PyArg_Parse(arg, "i:umask", &mask))
+ if (!PyArg_Parse(arg, "i:umask", &mask)) {
goto exit;
+ }
return_value = os_umask_impl(module, mask);
exit:
@@ -1401,8 +1438,9 @@ os_unlink(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int dir_fd = DEFAULT_DIR_FD;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|$O&:unlink", _keywords,
- path_converter, &path, UNLINKAT_DIR_FD_CONVERTER, &dir_fd))
+ path_converter, &path, UNLINKAT_DIR_FD_CONVERTER, &dir_fd)) {
goto exit;
+ }
return_value = os_unlink_impl(module, &path, dir_fd);
exit:
@@ -1438,8 +1476,9 @@ os_remove(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int dir_fd = DEFAULT_DIR_FD;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|$O&:remove", _keywords,
- path_converter, &path, UNLINKAT_DIR_FD_CONVERTER, &dir_fd))
+ path_converter, &path, UNLINKAT_DIR_FD_CONVERTER, &dir_fd)) {
goto exit;
+ }
return_value = os_remove_impl(module, &path, dir_fd);
exit:
@@ -1522,8 +1561,9 @@ os_utime(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int follow_symlinks = 1;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|O$OO&p:utime", _keywords,
- path_converter, &path, &times, &ns, FUTIMENSAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks))
+ path_converter, &path, &times, &ns, FUTIMENSAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks)) {
goto exit;
+ }
return_value = os_utime_impl(module, &path, times, ns, dir_fd, follow_symlinks);
exit:
@@ -1553,8 +1593,9 @@ os__exit(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int status;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:_exit", _keywords,
- &status))
+ &status)) {
goto exit;
+ }
return_value = os__exit_impl(module, status);
exit:
@@ -1588,8 +1629,9 @@ os_execv(PyModuleDef *module, PyObject *args)
PyObject *argv;
if (!PyArg_ParseTuple(args, "O&O:execv",
- PyUnicode_FSConverter, &path, &argv))
+ PyUnicode_FSConverter, &path, &argv)) {
goto exit;
+ }
return_value = os_execv_impl(module, path, argv);
exit:
@@ -1633,8 +1675,9 @@ os_execve(PyModuleDef *module, PyObject *args, PyObject *kwargs)
PyObject *env;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&OO:execve", _keywords,
- path_converter, &path, &argv, &env))
+ path_converter, &path, &argv, &env)) {
goto exit;
+ }
return_value = os_execve_impl(module, &path, argv, env);
exit:
@@ -1676,8 +1719,9 @@ os_spawnv(PyModuleDef *module, PyObject *args)
PyObject *argv;
if (!PyArg_ParseTuple(args, "iO&O:spawnv",
- &mode, PyUnicode_FSConverter, &path, &argv))
+ &mode, PyUnicode_FSConverter, &path, &argv)) {
goto exit;
+ }
return_value = os_spawnv_impl(module, mode, path, argv);
exit:
@@ -1723,8 +1767,9 @@ os_spawnve(PyModuleDef *module, PyObject *args)
PyObject *env;
if (!PyArg_ParseTuple(args, "iO&OO:spawnve",
- &mode, PyUnicode_FSConverter, &path, &argv, &env))
+ &mode, PyUnicode_FSConverter, &path, &argv, &env)) {
goto exit;
+ }
return_value = os_spawnve_impl(module, mode, path, argv, env);
exit:
@@ -1806,8 +1851,9 @@ os_sched_get_priority_max(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int policy;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:sched_get_priority_max", _keywords,
- &policy))
+ &policy)) {
goto exit;
+ }
return_value = os_sched_get_priority_max_impl(module, policy);
exit:
@@ -1838,8 +1884,9 @@ os_sched_get_priority_min(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int policy;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:sched_get_priority_min", _keywords,
- &policy))
+ &policy)) {
goto exit;
+ }
return_value = os_sched_get_priority_min_impl(module, policy);
exit:
@@ -1870,8 +1917,9 @@ os_sched_getscheduler(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
pid_t pid;
- if (!PyArg_Parse(arg, "" _Py_PARSE_PID ":sched_getscheduler", &pid))
+ if (!PyArg_Parse(arg, "" _Py_PARSE_PID ":sched_getscheduler", &pid)) {
goto exit;
+ }
return_value = os_sched_getscheduler_impl(module, pid);
exit:
@@ -1902,8 +1950,9 @@ os_sched_param(PyTypeObject *type, PyObject *args, PyObject *kwargs)
PyObject *sched_priority;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:sched_param", _keywords,
- &sched_priority))
+ &sched_priority)) {
goto exit;
+ }
return_value = os_sched_param_impl(type, sched_priority);
exit:
@@ -1939,8 +1988,9 @@ os_sched_setscheduler(PyModuleDef *module, PyObject *args)
struct sched_param param;
if (!PyArg_ParseTuple(args, "" _Py_PARSE_PID "iO&:sched_setscheduler",
- &pid, &policy, convert_sched_param, &param))
+ &pid, &policy, convert_sched_param, &param)) {
goto exit;
+ }
return_value = os_sched_setscheduler_impl(module, pid, policy, &param);
exit:
@@ -1972,8 +2022,9 @@ os_sched_getparam(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
pid_t pid;
- if (!PyArg_Parse(arg, "" _Py_PARSE_PID ":sched_getparam", &pid))
+ if (!PyArg_Parse(arg, "" _Py_PARSE_PID ":sched_getparam", &pid)) {
goto exit;
+ }
return_value = os_sched_getparam_impl(module, pid);
exit:
@@ -2008,8 +2059,9 @@ os_sched_setparam(PyModuleDef *module, PyObject *args)
struct sched_param param;
if (!PyArg_ParseTuple(args, "" _Py_PARSE_PID "O&:sched_setparam",
- &pid, convert_sched_param, &param))
+ &pid, convert_sched_param, &param)) {
goto exit;
+ }
return_value = os_sched_setparam_impl(module, pid, &param);
exit:
@@ -2041,11 +2093,13 @@ os_sched_rr_get_interval(PyModuleDef *module, PyObject *arg)
pid_t pid;
double _return_value;
- if (!PyArg_Parse(arg, "" _Py_PARSE_PID ":sched_rr_get_interval", &pid))
+ if (!PyArg_Parse(arg, "" _Py_PARSE_PID ":sched_rr_get_interval", &pid)) {
goto exit;
+ }
_return_value = os_sched_rr_get_interval_impl(module, pid);
- if ((_return_value == -1.0) && PyErr_Occurred())
+ if ((_return_value == -1.0) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyFloat_FromDouble(_return_value);
exit:
@@ -2100,8 +2154,9 @@ os_sched_setaffinity(PyModuleDef *module, PyObject *args)
PyObject *mask;
if (!PyArg_ParseTuple(args, "" _Py_PARSE_PID "O:sched_setaffinity",
- &pid, &mask))
+ &pid, &mask)) {
goto exit;
+ }
return_value = os_sched_setaffinity_impl(module, pid, mask);
exit:
@@ -2132,8 +2187,9 @@ os_sched_getaffinity(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
pid_t pid;
- if (!PyArg_Parse(arg, "" _Py_PARSE_PID ":sched_getaffinity", &pid))
+ if (!PyArg_Parse(arg, "" _Py_PARSE_PID ":sched_getaffinity", &pid)) {
goto exit;
+ }
return_value = os_sched_getaffinity_impl(module, pid);
exit:
@@ -2322,8 +2378,9 @@ os_getpgid(PyModuleDef *module, PyObject *args, PyObject *kwargs)
pid_t pid;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "" _Py_PARSE_PID ":getpgid", _keywords,
- &pid))
+ &pid)) {
goto exit;
+ }
return_value = os_getpgid_impl(module, pid);
exit:
@@ -2467,8 +2524,9 @@ os_kill(PyModuleDef *module, PyObject *args)
Py_ssize_t signal;
if (!PyArg_ParseTuple(args, "" _Py_PARSE_PID "n:kill",
- &pid, &signal))
+ &pid, &signal)) {
goto exit;
+ }
return_value = os_kill_impl(module, pid, signal);
exit:
@@ -2499,8 +2557,9 @@ os_killpg(PyModuleDef *module, PyObject *args)
int signal;
if (!PyArg_ParseTuple(args, "" _Py_PARSE_PID "i:killpg",
- &pgid, &signal))
+ &pgid, &signal)) {
goto exit;
+ }
return_value = os_killpg_impl(module, pgid, signal);
exit:
@@ -2529,8 +2588,9 @@ os_plock(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
int op;
- if (!PyArg_Parse(arg, "i:plock", &op))
+ if (!PyArg_Parse(arg, "i:plock", &op)) {
goto exit;
+ }
return_value = os_plock_impl(module, op);
exit:
@@ -2559,8 +2619,9 @@ os_setuid(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
uid_t uid;
- if (!PyArg_Parse(arg, "O&:setuid", _Py_Uid_Converter, &uid))
+ if (!PyArg_Parse(arg, "O&:setuid", _Py_Uid_Converter, &uid)) {
goto exit;
+ }
return_value = os_setuid_impl(module, uid);
exit:
@@ -2589,8 +2650,9 @@ os_seteuid(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
uid_t euid;
- if (!PyArg_Parse(arg, "O&:seteuid", _Py_Uid_Converter, &euid))
+ if (!PyArg_Parse(arg, "O&:seteuid", _Py_Uid_Converter, &euid)) {
goto exit;
+ }
return_value = os_seteuid_impl(module, euid);
exit:
@@ -2619,8 +2681,9 @@ os_setegid(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
gid_t egid;
- if (!PyArg_Parse(arg, "O&:setegid", _Py_Gid_Converter, &egid))
+ if (!PyArg_Parse(arg, "O&:setegid", _Py_Gid_Converter, &egid)) {
goto exit;
+ }
return_value = os_setegid_impl(module, egid);
exit:
@@ -2651,8 +2714,9 @@ os_setreuid(PyModuleDef *module, PyObject *args)
uid_t euid;
if (!PyArg_ParseTuple(args, "O&O&:setreuid",
- _Py_Uid_Converter, &ruid, _Py_Uid_Converter, &euid))
+ _Py_Uid_Converter, &ruid, _Py_Uid_Converter, &euid)) {
goto exit;
+ }
return_value = os_setreuid_impl(module, ruid, euid);
exit:
@@ -2683,8 +2747,9 @@ os_setregid(PyModuleDef *module, PyObject *args)
gid_t egid;
if (!PyArg_ParseTuple(args, "O&O&:setregid",
- _Py_Gid_Converter, &rgid, _Py_Gid_Converter, &egid))
+ _Py_Gid_Converter, &rgid, _Py_Gid_Converter, &egid)) {
goto exit;
+ }
return_value = os_setregid_impl(module, rgid, egid);
exit:
@@ -2713,8 +2778,9 @@ os_setgid(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
gid_t gid;
- if (!PyArg_Parse(arg, "O&:setgid", _Py_Gid_Converter, &gid))
+ if (!PyArg_Parse(arg, "O&:setgid", _Py_Gid_Converter, &gid)) {
goto exit;
+ }
return_value = os_setgid_impl(module, gid);
exit:
@@ -2761,8 +2827,9 @@ os_wait3(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int options;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:wait3", _keywords,
- &options))
+ &options)) {
goto exit;
+ }
return_value = os_wait3_impl(module, options);
exit:
@@ -2797,8 +2864,9 @@ os_wait4(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int options;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "" _Py_PARSE_PID "i:wait4", _keywords,
- &pid, &options))
+ &pid, &options)) {
goto exit;
+ }
return_value = os_wait4_impl(module, pid, options);
exit:
@@ -2841,8 +2909,9 @@ os_waitid(PyModuleDef *module, PyObject *args)
int options;
if (!PyArg_ParseTuple(args, "i" _Py_PARSE_PID "i:waitid",
- &idtype, &id, &options))
+ &idtype, &id, &options)) {
goto exit;
+ }
return_value = os_waitid_impl(module, idtype, id, options);
exit:
@@ -2878,8 +2947,9 @@ os_waitpid(PyModuleDef *module, PyObject *args)
int options;
if (!PyArg_ParseTuple(args, "" _Py_PARSE_PID "i:waitpid",
- &pid, &options))
+ &pid, &options)) {
goto exit;
+ }
return_value = os_waitpid_impl(module, pid, options);
exit:
@@ -2915,8 +2985,9 @@ os_waitpid(PyModuleDef *module, PyObject *args)
int options;
if (!PyArg_ParseTuple(args, "" _Py_PARSE_INTPTR "i:waitpid",
- &pid, &options))
+ &pid, &options)) {
goto exit;
+ }
return_value = os_waitpid_impl(module, pid, options);
exit:
@@ -2986,8 +3057,9 @@ os_symlink(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int dir_fd = DEFAULT_DIR_FD;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&|p$O&:symlink", _keywords,
- path_converter, &src, path_converter, &dst, &target_is_directory, SYMLINKAT_DIR_FD_CONVERTER, &dir_fd))
+ path_converter, &src, path_converter, &dst, &target_is_directory, SYMLINKAT_DIR_FD_CONVERTER, &dir_fd)) {
goto exit;
+ }
return_value = os_symlink_impl(module, &src, &dst, target_is_directory, dir_fd);
exit:
@@ -3047,8 +3119,9 @@ os_getsid(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
pid_t pid;
- if (!PyArg_Parse(arg, "" _Py_PARSE_PID ":getsid", &pid))
+ if (!PyArg_Parse(arg, "" _Py_PARSE_PID ":getsid", &pid)) {
goto exit;
+ }
return_value = os_getsid_impl(module, pid);
exit:
@@ -3101,8 +3174,9 @@ os_setpgid(PyModuleDef *module, PyObject *args)
pid_t pgrp;
if (!PyArg_ParseTuple(args, "" _Py_PARSE_PID "" _Py_PARSE_PID ":setpgid",
- &pid, &pgrp))
+ &pid, &pgrp)) {
goto exit;
+ }
return_value = os_setpgid_impl(module, pid, pgrp);
exit:
@@ -3131,8 +3205,9 @@ os_tcgetpgrp(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
int fd;
- if (!PyArg_Parse(arg, "i:tcgetpgrp", &fd))
+ if (!PyArg_Parse(arg, "i:tcgetpgrp", &fd)) {
goto exit;
+ }
return_value = os_tcgetpgrp_impl(module, fd);
exit:
@@ -3163,8 +3238,9 @@ os_tcsetpgrp(PyModuleDef *module, PyObject *args)
pid_t pgid;
if (!PyArg_ParseTuple(args, "i" _Py_PARSE_PID ":tcsetpgrp",
- &fd, &pgid))
+ &fd, &pgid)) {
goto exit;
+ }
return_value = os_tcsetpgrp_impl(module, fd, pgid);
exit:
@@ -3203,11 +3279,13 @@ os_open(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int _return_value;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&i|i$O&:open", _keywords,
- path_converter, &path, &flags, &mode, OPENAT_DIR_FD_CONVERTER, &dir_fd))
+ path_converter, &path, &flags, &mode, OPENAT_DIR_FD_CONVERTER, &dir_fd)) {
goto exit;
+ }
_return_value = os_open_impl(module, &path, flags, mode, dir_fd);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong((long)_return_value);
exit:
@@ -3237,8 +3315,9 @@ os_close(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int fd;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:close", _keywords,
- &fd))
+ &fd)) {
goto exit;
+ }
return_value = os_close_impl(module, fd);
exit:
@@ -3265,8 +3344,9 @@ os_closerange(PyModuleDef *module, PyObject *args)
int fd_high;
if (!PyArg_ParseTuple(args, "ii:closerange",
- &fd_low, &fd_high))
+ &fd_low, &fd_high)) {
goto exit;
+ }
return_value = os_closerange_impl(module, fd_low, fd_high);
exit:
@@ -3292,11 +3372,13 @@ os_dup(PyModuleDef *module, PyObject *arg)
int fd;
int _return_value;
- if (!PyArg_Parse(arg, "i:dup", &fd))
+ if (!PyArg_Parse(arg, "i:dup", &fd)) {
goto exit;
+ }
_return_value = os_dup_impl(module, fd);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong((long)_return_value);
exit:
@@ -3325,8 +3407,9 @@ os_dup2(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int inheritable = 1;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii|p:dup2", _keywords,
- &fd, &fd2, &inheritable))
+ &fd, &fd2, &inheritable)) {
goto exit;
+ }
return_value = os_dup2_impl(module, fd, fd2, inheritable);
exit:
@@ -3363,8 +3446,9 @@ os_lockf(PyModuleDef *module, PyObject *args)
Py_off_t length;
if (!PyArg_ParseTuple(args, "iiO&:lockf",
- &fd, &command, Py_off_t_converter, &length))
+ &fd, &command, Py_off_t_converter, &length)) {
goto exit;
+ }
return_value = os_lockf_impl(module, fd, command, length);
exit:
@@ -3398,11 +3482,13 @@ os_lseek(PyModuleDef *module, PyObject *args)
Py_off_t _return_value;
if (!PyArg_ParseTuple(args, "iO&i:lseek",
- &fd, Py_off_t_converter, &position, &how))
+ &fd, Py_off_t_converter, &position, &how)) {
goto exit;
+ }
_return_value = os_lseek_impl(module, fd, position, how);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromPy_off_t(_return_value);
exit:
@@ -3429,8 +3515,9 @@ os_read(PyModuleDef *module, PyObject *args)
Py_ssize_t length;
if (!PyArg_ParseTuple(args, "in:read",
- &fd, &length))
+ &fd, &length)) {
goto exit;
+ }
return_value = os_read_impl(module, fd, length);
exit:
@@ -3468,11 +3555,13 @@ os_readv(PyModuleDef *module, PyObject *args)
Py_ssize_t _return_value;
if (!PyArg_ParseTuple(args, "iO:readv",
- &fd, &buffers))
+ &fd, &buffers)) {
goto exit;
+ }
_return_value = os_readv_impl(module, fd, buffers);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromSsize_t(_return_value);
exit:
@@ -3507,8 +3596,9 @@ os_pread(PyModuleDef *module, PyObject *args)
Py_off_t offset;
if (!PyArg_ParseTuple(args, "iiO&:pread",
- &fd, &length, Py_off_t_converter, &offset))
+ &fd, &length, Py_off_t_converter, &offset)) {
goto exit;
+ }
return_value = os_pread_impl(module, fd, length, offset);
exit:
@@ -3538,17 +3628,20 @@ os_write(PyModuleDef *module, PyObject *args)
Py_ssize_t _return_value;
if (!PyArg_ParseTuple(args, "iy*:write",
- &fd, &data))
+ &fd, &data)) {
goto exit;
+ }
_return_value = os_write_impl(module, fd, &data);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromSsize_t(_return_value);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -3576,8 +3669,9 @@ os_fstat(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int fd;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:fstat", _keywords,
- &fd))
+ &fd)) {
goto exit;
+ }
return_value = os_fstat_impl(module, fd);
exit:
@@ -3606,11 +3700,13 @@ os_isatty(PyModuleDef *module, PyObject *arg)
int fd;
int _return_value;
- if (!PyArg_Parse(arg, "i:isatty", &fd))
+ if (!PyArg_Parse(arg, "i:isatty", &fd)) {
goto exit;
+ }
_return_value = os_isatty_impl(module, fd);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyBool_FromLong((long)_return_value);
exit:
@@ -3668,8 +3764,9 @@ os_pipe2(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
int flags;
- if (!PyArg_Parse(arg, "i:pipe2", &flags))
+ if (!PyArg_Parse(arg, "i:pipe2", &flags)) {
goto exit;
+ }
return_value = os_pipe2_impl(module, flags);
exit:
@@ -3704,11 +3801,13 @@ os_writev(PyModuleDef *module, PyObject *args)
Py_ssize_t _return_value;
if (!PyArg_ParseTuple(args, "iO:writev",
- &fd, &buffers))
+ &fd, &buffers)) {
goto exit;
+ }
_return_value = os_writev_impl(module, fd, buffers);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromSsize_t(_return_value);
exit:
@@ -3746,17 +3845,20 @@ os_pwrite(PyModuleDef *module, PyObject *args)
Py_ssize_t _return_value;
if (!PyArg_ParseTuple(args, "iy*O&:pwrite",
- &fd, &buffer, Py_off_t_converter, &offset))
+ &fd, &buffer, Py_off_t_converter, &offset)) {
goto exit;
+ }
_return_value = os_pwrite_impl(module, fd, &buffer, offset);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromSsize_t(_return_value);
exit:
/* Cleanup for buffer */
- if (buffer.obj)
+ if (buffer.obj) {
PyBuffer_Release(&buffer);
+ }
return return_value;
}
@@ -3792,8 +3894,9 @@ os_mkfifo(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int dir_fd = DEFAULT_DIR_FD;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|i$O&:mkfifo", _keywords,
- path_converter, &path, &mode, MKFIFOAT_DIR_FD_CONVERTER, &dir_fd))
+ path_converter, &path, &mode, MKFIFOAT_DIR_FD_CONVERTER, &dir_fd)) {
goto exit;
+ }
return_value = os_mkfifo_impl(module, &path, mode, dir_fd);
exit:
@@ -3843,8 +3946,9 @@ os_mknod(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int dir_fd = DEFAULT_DIR_FD;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|iO&$O&:mknod", _keywords,
- path_converter, &path, &mode, _Py_Dev_Converter, &device, MKNODAT_DIR_FD_CONVERTER, &dir_fd))
+ path_converter, &path, &mode, _Py_Dev_Converter, &device, MKNODAT_DIR_FD_CONVERTER, &dir_fd)) {
goto exit;
+ }
return_value = os_mknod_impl(module, &path, mode, device, dir_fd);
exit:
@@ -3877,11 +3981,13 @@ os_major(PyModuleDef *module, PyObject *arg)
dev_t device;
unsigned int _return_value;
- if (!PyArg_Parse(arg, "O&:major", _Py_Dev_Converter, &device))
+ if (!PyArg_Parse(arg, "O&:major", _Py_Dev_Converter, &device)) {
goto exit;
+ }
_return_value = os_major_impl(module, device);
- if ((_return_value == (unsigned int)-1) && PyErr_Occurred())
+ if ((_return_value == (unsigned int)-1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromUnsignedLong((unsigned long)_return_value);
exit:
@@ -3911,11 +4017,13 @@ os_minor(PyModuleDef *module, PyObject *arg)
dev_t device;
unsigned int _return_value;
- if (!PyArg_Parse(arg, "O&:minor", _Py_Dev_Converter, &device))
+ if (!PyArg_Parse(arg, "O&:minor", _Py_Dev_Converter, &device)) {
goto exit;
+ }
_return_value = os_minor_impl(module, device);
- if ((_return_value == (unsigned int)-1) && PyErr_Occurred())
+ if ((_return_value == (unsigned int)-1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromUnsignedLong((unsigned long)_return_value);
exit:
@@ -3947,11 +4055,13 @@ os_makedev(PyModuleDef *module, PyObject *args)
dev_t _return_value;
if (!PyArg_ParseTuple(args, "ii:makedev",
- &major, &minor))
+ &major, &minor)) {
goto exit;
+ }
_return_value = os_makedev_impl(module, major, minor);
- if ((_return_value == (dev_t)-1) && PyErr_Occurred())
+ if ((_return_value == (dev_t)-1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = _PyLong_FromDev(_return_value);
exit:
@@ -3982,8 +4092,9 @@ os_ftruncate(PyModuleDef *module, PyObject *args)
Py_off_t length;
if (!PyArg_ParseTuple(args, "iO&:ftruncate",
- &fd, Py_off_t_converter, &length))
+ &fd, Py_off_t_converter, &length)) {
goto exit;
+ }
return_value = os_ftruncate_impl(module, fd, length);
exit:
@@ -4018,8 +4129,9 @@ os_truncate(PyModuleDef *module, PyObject *args, PyObject *kwargs)
Py_off_t length;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&:truncate", _keywords,
- path_converter, &path, Py_off_t_converter, &length))
+ path_converter, &path, Py_off_t_converter, &length)) {
goto exit;
+ }
return_value = os_truncate_impl(module, &path, length);
exit:
@@ -4058,8 +4170,9 @@ os_posix_fallocate(PyModuleDef *module, PyObject *args)
Py_off_t length;
if (!PyArg_ParseTuple(args, "iO&O&:posix_fallocate",
- &fd, Py_off_t_converter, &offset, Py_off_t_converter, &length))
+ &fd, Py_off_t_converter, &offset, Py_off_t_converter, &length)) {
goto exit;
+ }
return_value = os_posix_fallocate_impl(module, fd, offset, length);
exit:
@@ -4101,8 +4214,9 @@ os_posix_fadvise(PyModuleDef *module, PyObject *args)
int advice;
if (!PyArg_ParseTuple(args, "iO&O&i:posix_fadvise",
- &fd, Py_off_t_converter, &offset, Py_off_t_converter, &length, &advice))
+ &fd, Py_off_t_converter, &offset, Py_off_t_converter, &length, &advice)) {
goto exit;
+ }
return_value = os_posix_fadvise_impl(module, fd, offset, length, advice);
exit:
@@ -4133,8 +4247,9 @@ os_putenv(PyModuleDef *module, PyObject *args)
PyObject *value;
if (!PyArg_ParseTuple(args, "UU:putenv",
- &name, &value))
+ &name, &value)) {
goto exit;
+ }
return_value = os_putenv_impl(module, name, value);
exit:
@@ -4165,8 +4280,9 @@ os_putenv(PyModuleDef *module, PyObject *args)
PyObject *value = NULL;
if (!PyArg_ParseTuple(args, "O&O&:putenv",
- PyUnicode_FSConverter, &name, PyUnicode_FSConverter, &value))
+ PyUnicode_FSConverter, &name, PyUnicode_FSConverter, &value)) {
goto exit;
+ }
return_value = os_putenv_impl(module, name, value);
exit:
@@ -4200,8 +4316,9 @@ os_unsetenv(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
PyObject *name = NULL;
- if (!PyArg_Parse(arg, "O&:unsetenv", PyUnicode_FSConverter, &name))
+ if (!PyArg_Parse(arg, "O&:unsetenv", PyUnicode_FSConverter, &name)) {
goto exit;
+ }
return_value = os_unsetenv_impl(module, name);
exit:
@@ -4231,8 +4348,9 @@ os_strerror(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
int code;
- if (!PyArg_Parse(arg, "i:strerror", &code))
+ if (!PyArg_Parse(arg, "i:strerror", &code)) {
goto exit;
+ }
return_value = os_strerror_impl(module, code);
exit:
@@ -4260,11 +4378,13 @@ os_WCOREDUMP(PyModuleDef *module, PyObject *arg)
int status;
int _return_value;
- if (!PyArg_Parse(arg, "i:WCOREDUMP", &status))
+ if (!PyArg_Parse(arg, "i:WCOREDUMP", &status)) {
goto exit;
+ }
_return_value = os_WCOREDUMP_impl(module, status);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyBool_FromLong((long)_return_value);
exit:
@@ -4299,11 +4419,13 @@ os_WIFCONTINUED(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int _return_value;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:WIFCONTINUED", _keywords,
- &status))
+ &status)) {
goto exit;
+ }
_return_value = os_WIFCONTINUED_impl(module, status);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyBool_FromLong((long)_return_value);
exit:
@@ -4335,11 +4457,13 @@ os_WIFSTOPPED(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int _return_value;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:WIFSTOPPED", _keywords,
- &status))
+ &status)) {
goto exit;
+ }
_return_value = os_WIFSTOPPED_impl(module, status);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyBool_FromLong((long)_return_value);
exit:
@@ -4371,11 +4495,13 @@ os_WIFSIGNALED(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int _return_value;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:WIFSIGNALED", _keywords,
- &status))
+ &status)) {
goto exit;
+ }
_return_value = os_WIFSIGNALED_impl(module, status);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyBool_FromLong((long)_return_value);
exit:
@@ -4407,11 +4533,13 @@ os_WIFEXITED(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int _return_value;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:WIFEXITED", _keywords,
- &status))
+ &status)) {
goto exit;
+ }
_return_value = os_WIFEXITED_impl(module, status);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyBool_FromLong((long)_return_value);
exit:
@@ -4443,11 +4571,13 @@ os_WEXITSTATUS(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int _return_value;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:WEXITSTATUS", _keywords,
- &status))
+ &status)) {
goto exit;
+ }
_return_value = os_WEXITSTATUS_impl(module, status);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong((long)_return_value);
exit:
@@ -4479,11 +4609,13 @@ os_WTERMSIG(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int _return_value;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:WTERMSIG", _keywords,
- &status))
+ &status)) {
goto exit;
+ }
_return_value = os_WTERMSIG_impl(module, status);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong((long)_return_value);
exit:
@@ -4515,11 +4647,13 @@ os_WSTOPSIG(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int _return_value;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:WSTOPSIG", _keywords,
- &status))
+ &status)) {
goto exit;
+ }
_return_value = os_WSTOPSIG_impl(module, status);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong((long)_return_value);
exit:
@@ -4550,8 +4684,9 @@ os_fstatvfs(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
int fd;
- if (!PyArg_Parse(arg, "i:fstatvfs", &fd))
+ if (!PyArg_Parse(arg, "i:fstatvfs", &fd)) {
goto exit;
+ }
return_value = os_fstatvfs_impl(module, fd);
exit:
@@ -4586,8 +4721,9 @@ os_statvfs(PyModuleDef *module, PyObject *args, PyObject *kwargs)
path_t path = PATH_T_INITIALIZE("statvfs", "path", 0, PATH_HAVE_FSTATVFS);
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&:statvfs", _keywords,
- path_converter, &path))
+ path_converter, &path)) {
goto exit;
+ }
return_value = os_statvfs_impl(module, &path);
exit:
@@ -4621,8 +4757,9 @@ os__getdiskusage(PyModuleDef *module, PyObject *args, PyObject *kwargs)
Py_UNICODE *path;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "u:_getdiskusage", _keywords,
- &path))
+ &path)) {
goto exit;
+ }
return_value = os__getdiskusage_impl(module, path);
exit:
@@ -4656,11 +4793,13 @@ os_fpathconf(PyModuleDef *module, PyObject *args)
long _return_value;
if (!PyArg_ParseTuple(args, "iO&:fpathconf",
- &fd, conv_path_confname, &name))
+ &fd, conv_path_confname, &name)) {
goto exit;
+ }
_return_value = os_fpathconf_impl(module, fd, name);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong(_return_value);
exit:
@@ -4697,11 +4836,13 @@ os_pathconf(PyModuleDef *module, PyObject *args, PyObject *kwargs)
long _return_value;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&:pathconf", _keywords,
- path_converter, &path, conv_path_confname, &name))
+ path_converter, &path, conv_path_confname, &name)) {
goto exit;
+ }
_return_value = os_pathconf_impl(module, &path, name);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong(_return_value);
exit:
@@ -4733,8 +4874,9 @@ os_confstr(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
int name;
- if (!PyArg_Parse(arg, "O&:confstr", conv_confstr_confname, &name))
+ if (!PyArg_Parse(arg, "O&:confstr", conv_confstr_confname, &name)) {
goto exit;
+ }
return_value = os_confstr_impl(module, name);
exit:
@@ -4764,11 +4906,13 @@ os_sysconf(PyModuleDef *module, PyObject *arg)
int name;
long _return_value;
- if (!PyArg_Parse(arg, "O&:sysconf", conv_sysconf_confname, &name))
+ if (!PyArg_Parse(arg, "O&:sysconf", conv_sysconf_confname, &name)) {
goto exit;
+ }
_return_value = os_sysconf_impl(module, name);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong(_return_value);
exit:
@@ -4847,8 +4991,9 @@ os_device_encoding(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int fd;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:device_encoding", _keywords,
- &fd))
+ &fd)) {
goto exit;
+ }
return_value = os_device_encoding_impl(module, fd);
exit:
@@ -4878,8 +5023,9 @@ os_setresuid(PyModuleDef *module, PyObject *args)
uid_t suid;
if (!PyArg_ParseTuple(args, "O&O&O&:setresuid",
- _Py_Uid_Converter, &ruid, _Py_Uid_Converter, &euid, _Py_Uid_Converter, &suid))
+ _Py_Uid_Converter, &ruid, _Py_Uid_Converter, &euid, _Py_Uid_Converter, &suid)) {
goto exit;
+ }
return_value = os_setresuid_impl(module, ruid, euid, suid);
exit:
@@ -4911,8 +5057,9 @@ os_setresgid(PyModuleDef *module, PyObject *args)
gid_t sgid;
if (!PyArg_ParseTuple(args, "O&O&O&:setresgid",
- _Py_Gid_Converter, &rgid, _Py_Gid_Converter, &egid, _Py_Gid_Converter, &sgid))
+ _Py_Gid_Converter, &rgid, _Py_Gid_Converter, &egid, _Py_Gid_Converter, &sgid)) {
goto exit;
+ }
return_value = os_setresgid_impl(module, rgid, egid, sgid);
exit:
@@ -4995,8 +5142,9 @@ os_getxattr(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int follow_symlinks = 1;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&|$p:getxattr", _keywords,
- path_converter, &path, path_converter, &attribute, &follow_symlinks))
+ path_converter, &path, path_converter, &attribute, &follow_symlinks)) {
goto exit;
+ }
return_value = os_getxattr_impl(module, &path, &attribute, follow_symlinks);
exit:
@@ -5043,8 +5191,9 @@ os_setxattr(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int follow_symlinks = 1;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&y*|i$p:setxattr", _keywords,
- path_converter, &path, path_converter, &attribute, &value, &flags, &follow_symlinks))
+ path_converter, &path, path_converter, &attribute, &value, &flags, &follow_symlinks)) {
goto exit;
+ }
return_value = os_setxattr_impl(module, &path, &attribute, &value, flags, follow_symlinks);
exit:
@@ -5053,8 +5202,9 @@ exit:
/* Cleanup for attribute */
path_cleanup(&attribute);
/* Cleanup for value */
- if (value.obj)
+ if (value.obj) {
PyBuffer_Release(&value);
+ }
return return_value;
}
@@ -5091,8 +5241,9 @@ os_removexattr(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int follow_symlinks = 1;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&|$p:removexattr", _keywords,
- path_converter, &path, path_converter, &attribute, &follow_symlinks))
+ path_converter, &path, path_converter, &attribute, &follow_symlinks)) {
goto exit;
+ }
return_value = os_removexattr_impl(module, &path, &attribute, follow_symlinks);
exit:
@@ -5135,8 +5286,9 @@ os_listxattr(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int follow_symlinks = 1;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O&$p:listxattr", _keywords,
- path_converter, &path, &follow_symlinks))
+ path_converter, &path, &follow_symlinks)) {
goto exit;
+ }
return_value = os_listxattr_impl(module, &path, follow_symlinks);
exit:
@@ -5166,8 +5318,9 @@ os_urandom(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
Py_ssize_t size;
- if (!PyArg_Parse(arg, "n:urandom", &size))
+ if (!PyArg_Parse(arg, "n:urandom", &size)) {
goto exit;
+ }
return_value = os_urandom_impl(module, size);
exit:
@@ -5215,11 +5368,13 @@ os_get_inheritable(PyModuleDef *module, PyObject *arg)
int fd;
int _return_value;
- if (!PyArg_Parse(arg, "i:get_inheritable", &fd))
+ if (!PyArg_Parse(arg, "i:get_inheritable", &fd)) {
goto exit;
+ }
_return_value = os_get_inheritable_impl(module, fd);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyBool_FromLong((long)_return_value);
exit:
@@ -5246,8 +5401,9 @@ os_set_inheritable(PyModuleDef *module, PyObject *args)
int inheritable;
if (!PyArg_ParseTuple(args, "ii:set_inheritable",
- &fd, &inheritable))
+ &fd, &inheritable)) {
goto exit;
+ }
return_value = os_set_inheritable_impl(module, fd, inheritable);
exit:
@@ -5275,11 +5431,13 @@ os_get_handle_inheritable(PyModuleDef *module, PyObject *arg)
Py_intptr_t handle;
int _return_value;
- if (!PyArg_Parse(arg, "" _Py_PARSE_INTPTR ":get_handle_inheritable", &handle))
+ if (!PyArg_Parse(arg, "" _Py_PARSE_INTPTR ":get_handle_inheritable", &handle)) {
goto exit;
+ }
_return_value = os_get_handle_inheritable_impl(module, handle);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyBool_FromLong((long)_return_value);
exit:
@@ -5311,8 +5469,9 @@ os_set_handle_inheritable(PyModuleDef *module, PyObject *args)
int inheritable;
if (!PyArg_ParseTuple(args, "" _Py_PARSE_INTPTR "p:set_handle_inheritable",
- &handle, &inheritable))
+ &handle, &inheritable)) {
goto exit;
+ }
return_value = os_set_handle_inheritable_impl(module, handle, inheritable);
exit:
@@ -5345,8 +5504,9 @@ os_fspath(PyModuleDef *module, PyObject *args, PyObject *kwargs)
PyObject *path;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:fspath", _keywords,
- &path))
+ &path)) {
goto exit;
+ }
return_value = os_fspath_impl(module, path);
exit:
@@ -5824,4 +5984,4 @@ exit:
#ifndef OS_SET_HANDLE_INHERITABLE_METHODDEF
#define OS_SET_HANDLE_INHERITABLE_METHODDEF
#endif /* !defined(OS_SET_HANDLE_INHERITABLE_METHODDEF) */
-/*[clinic end generated code: output=e64e246b8270abda input=a9049054013a1b77]*/
+/*[clinic end generated code: output=31dd4f672c8a6f8c input=a9049054013a1b77]*/
diff --git a/Modules/clinic/pwdmodule.c.h b/Modules/clinic/pwdmodule.c.h
index 9de2e4ff2a..6b50464b00 100644
--- a/Modules/clinic/pwdmodule.c.h
+++ b/Modules/clinic/pwdmodule.c.h
@@ -33,8 +33,9 @@ pwd_getpwnam(PyModuleDef *module, PyObject *arg_)
PyObject *return_value = NULL;
PyObject *arg;
- if (!PyArg_Parse(arg_, "U:getpwnam", &arg))
+ if (!PyArg_Parse(arg_, "U:getpwnam", &arg)) {
goto exit;
+ }
return_value = pwd_getpwnam_impl(module, arg);
exit:
@@ -68,4 +69,4 @@ pwd_getpwall(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
#ifndef PWD_GETPWALL_METHODDEF
#define PWD_GETPWALL_METHODDEF
#endif /* !defined(PWD_GETPWALL_METHODDEF) */
-/*[clinic end generated code: output=2ed0ecf34fd3f98f input=a9049054013a1b77]*/
+/*[clinic end generated code: output=f807c89b44be0fde input=a9049054013a1b77]*/
diff --git a/Modules/clinic/pyexpat.c.h b/Modules/clinic/pyexpat.c.h
index 379c5db637..0c1f3fc0fc 100644
--- a/Modules/clinic/pyexpat.c.h
+++ b/Modules/clinic/pyexpat.c.h
@@ -25,8 +25,9 @@ pyexpat_xmlparser_Parse(xmlparseobject *self, PyObject *args)
int isfinal = 0;
if (!PyArg_ParseTuple(args, "O|i:Parse",
- &data, &isfinal))
+ &data, &isfinal)) {
goto exit;
+ }
return_value = pyexpat_xmlparser_Parse_impl(self, data, isfinal);
exit:
@@ -60,8 +61,9 @@ pyexpat_xmlparser_SetBase(xmlparseobject *self, PyObject *arg)
PyObject *return_value = NULL;
const char *base;
- if (!PyArg_Parse(arg, "s:SetBase", &base))
+ if (!PyArg_Parse(arg, "s:SetBase", &base)) {
goto exit;
+ }
return_value = pyexpat_xmlparser_SetBase_impl(self, base);
exit:
@@ -129,8 +131,9 @@ pyexpat_xmlparser_ExternalEntityParserCreate(xmlparseobject *self, PyObject *arg
const char *encoding = NULL;
if (!PyArg_ParseTuple(args, "z|s:ExternalEntityParserCreate",
- &context, &encoding))
+ &context, &encoding)) {
goto exit;
+ }
return_value = pyexpat_xmlparser_ExternalEntityParserCreate_impl(self, context, encoding);
exit:
@@ -160,8 +163,9 @@ pyexpat_xmlparser_SetParamEntityParsing(xmlparseobject *self, PyObject *arg)
PyObject *return_value = NULL;
int flag;
- if (!PyArg_Parse(arg, "i:SetParamEntityParsing", &flag))
+ if (!PyArg_Parse(arg, "i:SetParamEntityParsing", &flag)) {
goto exit;
+ }
return_value = pyexpat_xmlparser_SetParamEntityParsing_impl(self, flag);
exit:
@@ -193,8 +197,9 @@ pyexpat_xmlparser_UseForeignDTD(xmlparseobject *self, PyObject *args)
int flag = 1;
if (!PyArg_ParseTuple(args, "|p:UseForeignDTD",
- &flag))
+ &flag)) {
goto exit;
+ }
return_value = pyexpat_xmlparser_UseForeignDTD_impl(self, flag);
exit:
@@ -244,8 +249,9 @@ pyexpat_ParserCreate(PyModuleDef *module, PyObject *args, PyObject *kwargs)
PyObject *intern = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|zzO:ParserCreate", _keywords,
- &encoding, &namespace_separator, &intern))
+ &encoding, &namespace_separator, &intern)) {
goto exit;
+ }
return_value = pyexpat_ParserCreate_impl(module, encoding, namespace_separator, intern);
exit:
@@ -270,8 +276,9 @@ pyexpat_ErrorString(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
long code;
- if (!PyArg_Parse(arg, "l:ErrorString", &code))
+ if (!PyArg_Parse(arg, "l:ErrorString", &code)) {
goto exit;
+ }
return_value = pyexpat_ErrorString_impl(module, code);
exit:
@@ -281,4 +288,4 @@ exit:
#ifndef PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
#define PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
#endif /* !defined(PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF) */
-/*[clinic end generated code: output=bf4d99c9702d8a6c input=a9049054013a1b77]*/
+/*[clinic end generated code: output=71a60d709647fbe3 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/sha1module.c.h b/Modules/clinic/sha1module.c.h
index fa865baec8..6d3fa64334 100644
--- a/Modules/clinic/sha1module.c.h
+++ b/Modules/clinic/sha1module.c.h
@@ -85,11 +85,12 @@ _sha1_sha1(PyModuleDef *module, PyObject *args, PyObject *kwargs)
PyObject *string = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:sha1", _keywords,
- &string))
+ &string)) {
goto exit;
+ }
return_value = _sha1_sha1_impl(module, string);
exit:
return return_value;
}
-/*[clinic end generated code: output=be19102f3120490a input=a9049054013a1b77]*/
+/*[clinic end generated code: output=40df3f8955919e72 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/sha256module.c.h b/Modules/clinic/sha256module.c.h
index c5fe188a9c..c429800118 100644
--- a/Modules/clinic/sha256module.c.h
+++ b/Modules/clinic/sha256module.c.h
@@ -85,8 +85,9 @@ _sha256_sha256(PyModuleDef *module, PyObject *args, PyObject *kwargs)
PyObject *string = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:sha256", _keywords,
- &string))
+ &string)) {
goto exit;
+ }
return_value = _sha256_sha256_impl(module, string);
exit:
@@ -113,11 +114,12 @@ _sha256_sha224(PyModuleDef *module, PyObject *args, PyObject *kwargs)
PyObject *string = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:sha224", _keywords,
- &string))
+ &string)) {
goto exit;
+ }
return_value = _sha256_sha224_impl(module, string);
exit:
return return_value;
}
-/*[clinic end generated code: output=354cedf3b632c7b2 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=e85cc4a223371d84 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/sha512module.c.h b/Modules/clinic/sha512module.c.h
index c308739d44..94fb15ca84 100644
--- a/Modules/clinic/sha512module.c.h
+++ b/Modules/clinic/sha512module.c.h
@@ -103,8 +103,9 @@ _sha512_sha512(PyModuleDef *module, PyObject *args, PyObject *kwargs)
PyObject *string = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:sha512", _keywords,
- &string))
+ &string)) {
goto exit;
+ }
return_value = _sha512_sha512_impl(module, string);
exit:
@@ -135,8 +136,9 @@ _sha512_sha384(PyModuleDef *module, PyObject *args, PyObject *kwargs)
PyObject *string = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:sha384", _keywords,
- &string))
+ &string)) {
goto exit;
+ }
return_value = _sha512_sha384_impl(module, string);
exit:
@@ -168,4 +170,4 @@ exit:
#ifndef _SHA512_SHA384_METHODDEF
#define _SHA512_SHA384_METHODDEF
#endif /* !defined(_SHA512_SHA384_METHODDEF) */
-/*[clinic end generated code: output=1c7d385731fee7c0 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=845af47cea22e2a1 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/signalmodule.c.h b/Modules/clinic/signalmodule.c.h
index ec07ef1f8e..e0aaab67a6 100644
--- a/Modules/clinic/signalmodule.c.h
+++ b/Modules/clinic/signalmodule.c.h
@@ -23,11 +23,13 @@ signal_alarm(PyModuleDef *module, PyObject *arg)
int seconds;
long _return_value;
- if (!PyArg_Parse(arg, "i:alarm", &seconds))
+ if (!PyArg_Parse(arg, "i:alarm", &seconds)) {
goto exit;
+ }
_return_value = signal_alarm_impl(module, seconds);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong(_return_value);
exit:
@@ -85,8 +87,9 @@ signal_signal(PyModuleDef *module, PyObject *args)
PyObject *handler;
if (!PyArg_ParseTuple(args, "iO:signal",
- &signalnum, &handler))
+ &signalnum, &handler)) {
goto exit;
+ }
return_value = signal_signal_impl(module, signalnum, handler);
exit:
@@ -117,8 +120,9 @@ signal_getsignal(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
int signalnum;
- if (!PyArg_Parse(arg, "i:getsignal", &signalnum))
+ if (!PyArg_Parse(arg, "i:getsignal", &signalnum)) {
goto exit;
+ }
return_value = signal_getsignal_impl(module, signalnum);
exit:
@@ -150,8 +154,9 @@ signal_siginterrupt(PyModuleDef *module, PyObject *args)
int flag;
if (!PyArg_ParseTuple(args, "ii:siginterrupt",
- &signalnum, &flag))
+ &signalnum, &flag)) {
goto exit;
+ }
return_value = signal_siginterrupt_impl(module, signalnum, flag);
exit:
@@ -189,8 +194,9 @@ signal_setitimer(PyModuleDef *module, PyObject *args)
double interval = 0.0;
if (!PyArg_ParseTuple(args, "id|d:setitimer",
- &which, &seconds, &interval))
+ &which, &seconds, &interval)) {
goto exit;
+ }
return_value = signal_setitimer_impl(module, which, seconds, interval);
exit:
@@ -219,8 +225,9 @@ signal_getitimer(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
int which;
- if (!PyArg_Parse(arg, "i:getitimer", &which))
+ if (!PyArg_Parse(arg, "i:getitimer", &which)) {
goto exit;
+ }
return_value = signal_getitimer_impl(module, which);
exit:
@@ -251,8 +258,9 @@ signal_pthread_sigmask(PyModuleDef *module, PyObject *args)
PyObject *mask;
if (!PyArg_ParseTuple(args, "iO:pthread_sigmask",
- &how, &mask))
+ &how, &mask)) {
goto exit;
+ }
return_value = signal_pthread_sigmask_impl(module, how, mask);
exit:
@@ -344,8 +352,9 @@ signal_sigtimedwait(PyModuleDef *module, PyObject *args)
if (!PyArg_UnpackTuple(args, "sigtimedwait",
2, 2,
- &sigset, &timeout_obj))
+ &sigset, &timeout_obj)) {
goto exit;
+ }
return_value = signal_sigtimedwait_impl(module, sigset, timeout_obj);
exit:
@@ -376,8 +385,9 @@ signal_pthread_kill(PyModuleDef *module, PyObject *args)
int signalnum;
if (!PyArg_ParseTuple(args, "li:pthread_kill",
- &thread_id, &signalnum))
+ &thread_id, &signalnum)) {
goto exit;
+ }
return_value = signal_pthread_kill_impl(module, thread_id, signalnum);
exit:
@@ -429,4 +439,4 @@ exit:
#ifndef SIGNAL_PTHREAD_KILL_METHODDEF
#define SIGNAL_PTHREAD_KILL_METHODDEF
#endif /* !defined(SIGNAL_PTHREAD_KILL_METHODDEF) */
-/*[clinic end generated code: output=b99278c16c40ea43 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=4b9519180a091536 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/spwdmodule.c.h b/Modules/clinic/spwdmodule.c.h
index c0d18db589..51bda962c2 100644
--- a/Modules/clinic/spwdmodule.c.h
+++ b/Modules/clinic/spwdmodule.c.h
@@ -24,8 +24,9 @@ spwd_getspnam(PyModuleDef *module, PyObject *arg_)
PyObject *return_value = NULL;
PyObject *arg;
- if (!PyArg_Parse(arg_, "U:getspnam", &arg))
+ if (!PyArg_Parse(arg_, "U:getspnam", &arg)) {
goto exit;
+ }
return_value = spwd_getspnam_impl(module, arg);
exit:
@@ -65,4 +66,4 @@ spwd_getspall(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
#ifndef SPWD_GETSPALL_METHODDEF
#define SPWD_GETSPALL_METHODDEF
#endif /* !defined(SPWD_GETSPALL_METHODDEF) */
-/*[clinic end generated code: output=6c178830413f7763 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=2b7a384447e5f1e3 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/unicodedata.c.h b/Modules/clinic/unicodedata.c.h
index d520c1e3dd..d481ccbe64 100644
--- a/Modules/clinic/unicodedata.c.h
+++ b/Modules/clinic/unicodedata.c.h
@@ -27,8 +27,9 @@ unicodedata_UCD_decimal(PyObject *self, PyObject *args)
PyObject *default_value = NULL;
if (!PyArg_ParseTuple(args, "C|O:decimal",
- &chr, &default_value))
+ &chr, &default_value)) {
goto exit;
+ }
return_value = unicodedata_UCD_decimal_impl(self, chr, default_value);
exit:
@@ -59,8 +60,9 @@ unicodedata_UCD_digit(PyObject *self, PyObject *args)
PyObject *default_value = NULL;
if (!PyArg_ParseTuple(args, "C|O:digit",
- &chr, &default_value))
+ &chr, &default_value)) {
goto exit;
+ }
return_value = unicodedata_UCD_digit_impl(self, chr, default_value);
exit:
@@ -92,8 +94,9 @@ unicodedata_UCD_numeric(PyObject *self, PyObject *args)
PyObject *default_value = NULL;
if (!PyArg_ParseTuple(args, "C|O:numeric",
- &chr, &default_value))
+ &chr, &default_value)) {
goto exit;
+ }
return_value = unicodedata_UCD_numeric_impl(self, chr, default_value);
exit:
@@ -118,8 +121,9 @@ unicodedata_UCD_category(PyObject *self, PyObject *arg)
PyObject *return_value = NULL;
int chr;
- if (!PyArg_Parse(arg, "C:category", &chr))
+ if (!PyArg_Parse(arg, "C:category", &chr)) {
goto exit;
+ }
return_value = unicodedata_UCD_category_impl(self, chr);
exit:
@@ -146,8 +150,9 @@ unicodedata_UCD_bidirectional(PyObject *self, PyObject *arg)
PyObject *return_value = NULL;
int chr;
- if (!PyArg_Parse(arg, "C:bidirectional", &chr))
+ if (!PyArg_Parse(arg, "C:bidirectional", &chr)) {
goto exit;
+ }
return_value = unicodedata_UCD_bidirectional_impl(self, chr);
exit:
@@ -175,11 +180,13 @@ unicodedata_UCD_combining(PyObject *self, PyObject *arg)
int chr;
int _return_value;
- if (!PyArg_Parse(arg, "C:combining", &chr))
+ if (!PyArg_Parse(arg, "C:combining", &chr)) {
goto exit;
+ }
_return_value = unicodedata_UCD_combining_impl(self, chr);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong((long)_return_value);
exit:
@@ -208,11 +215,13 @@ unicodedata_UCD_mirrored(PyObject *self, PyObject *arg)
int chr;
int _return_value;
- if (!PyArg_Parse(arg, "C:mirrored", &chr))
+ if (!PyArg_Parse(arg, "C:mirrored", &chr)) {
goto exit;
+ }
_return_value = unicodedata_UCD_mirrored_impl(self, chr);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
+ }
return_value = PyLong_FromLong((long)_return_value);
exit:
@@ -237,8 +246,9 @@ unicodedata_UCD_east_asian_width(PyObject *self, PyObject *arg)
PyObject *return_value = NULL;
int chr;
- if (!PyArg_Parse(arg, "C:east_asian_width", &chr))
+ if (!PyArg_Parse(arg, "C:east_asian_width", &chr)) {
goto exit;
+ }
return_value = unicodedata_UCD_east_asian_width_impl(self, chr);
exit:
@@ -265,8 +275,9 @@ unicodedata_UCD_decomposition(PyObject *self, PyObject *arg)
PyObject *return_value = NULL;
int chr;
- if (!PyArg_Parse(arg, "C:decomposition", &chr))
+ if (!PyArg_Parse(arg, "C:decomposition", &chr)) {
goto exit;
+ }
return_value = unicodedata_UCD_decomposition_impl(self, chr);
exit:
@@ -296,8 +307,9 @@ unicodedata_UCD_normalize(PyObject *self, PyObject *args)
PyObject *input;
if (!PyArg_ParseTuple(args, "sO!:normalize",
- &form, &PyUnicode_Type, &input))
+ &form, &PyUnicode_Type, &input)) {
goto exit;
+ }
return_value = unicodedata_UCD_normalize_impl(self, form, input);
exit:
@@ -327,8 +339,9 @@ unicodedata_UCD_name(PyObject *self, PyObject *args)
PyObject *default_value = NULL;
if (!PyArg_ParseTuple(args, "C|O:name",
- &chr, &default_value))
+ &chr, &default_value)) {
goto exit;
+ }
return_value = unicodedata_UCD_name_impl(self, chr, default_value);
exit:
@@ -358,11 +371,12 @@ unicodedata_UCD_lookup(PyObject *self, PyObject *arg)
const char *name;
Py_ssize_clean_t name_length;
- if (!PyArg_Parse(arg, "s#:lookup", &name, &name_length))
+ if (!PyArg_Parse(arg, "s#:lookup", &name, &name_length)) {
goto exit;
+ }
return_value = unicodedata_UCD_lookup_impl(self, name, name_length);
exit:
return return_value;
}
-/*[clinic end generated code: output=4f8da33c6bc6efc9 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5313ce129da87b2f input=a9049054013a1b77]*/
diff --git a/Modules/clinic/zlibmodule.c.h b/Modules/clinic/zlibmodule.c.h
index 7ca48cb16b..c657bcb644 100644
--- a/Modules/clinic/zlibmodule.c.h
+++ b/Modules/clinic/zlibmodule.c.h
@@ -28,14 +28,16 @@ zlib_compress(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int level = Z_DEFAULT_COMPRESSION;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|i:compress", _keywords,
- &data, &level))
+ &data, &level)) {
goto exit;
+ }
return_value = zlib_compress_impl(module, &data, level);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -69,14 +71,16 @@ zlib_decompress(PyModuleDef *module, PyObject *args)
unsigned int bufsize = DEF_BUF_SIZE;
if (!PyArg_ParseTuple(args, "y*|iO&:decompress",
- &data, &wbits, capped_uint_converter, &bufsize))
+ &data, &wbits, capped_uint_converter, &bufsize)) {
goto exit;
+ }
return_value = zlib_decompress_impl(module, &data, wbits, bufsize);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -131,14 +135,16 @@ zlib_compressobj(PyModuleDef *module, PyObject *args, PyObject *kwargs)
Py_buffer zdict = {NULL, NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iiiiiy*:compressobj", _keywords,
- &level, &method, &wbits, &memLevel, &strategy, &zdict))
+ &level, &method, &wbits, &memLevel, &strategy, &zdict)) {
goto exit;
+ }
return_value = zlib_compressobj_impl(module, level, method, wbits, memLevel, strategy, &zdict);
exit:
/* Cleanup for zdict */
- if (zdict.obj)
+ if (zdict.obj) {
PyBuffer_Release(&zdict);
+ }
return return_value;
}
@@ -170,8 +176,9 @@ zlib_decompressobj(PyModuleDef *module, PyObject *args, PyObject *kwargs)
PyObject *zdict = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iO:decompressobj", _keywords,
- &wbits, &zdict))
+ &wbits, &zdict)) {
goto exit;
+ }
return_value = zlib_decompressobj_impl(module, wbits, zdict);
exit:
@@ -203,14 +210,16 @@ zlib_Compress_compress(compobject *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 = zlib_Compress_compress_impl(self, &data);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -247,14 +256,16 @@ zlib_Decompress_decompress(compobject *self, PyObject *args)
unsigned int max_length = 0;
if (!PyArg_ParseTuple(args, "y*|O&:decompress",
- &data, capped_uint_converter, &max_length))
+ &data, capped_uint_converter, &max_length)) {
goto exit;
+ }
return_value = zlib_Decompress_decompress_impl(self, &data, max_length);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -284,8 +295,9 @@ zlib_Compress_flush(compobject *self, PyObject *args)
int mode = Z_FINISH;
if (!PyArg_ParseTuple(args, "|i:flush",
- &mode))
+ &mode)) {
goto exit;
+ }
return_value = zlib_Compress_flush_impl(self, mode);
exit:
@@ -358,8 +370,9 @@ zlib_Decompress_flush(compobject *self, PyObject *args)
unsigned int length = DEF_BUF_SIZE;
if (!PyArg_ParseTuple(args, "|O&:flush",
- capped_uint_converter, &length))
+ capped_uint_converter, &length)) {
goto exit;
+ }
return_value = zlib_Decompress_flush_impl(self, length);
exit:
@@ -391,14 +404,16 @@ zlib_adler32(PyModuleDef *module, PyObject *args)
unsigned int value = 1;
if (!PyArg_ParseTuple(args, "y*|I:adler32",
- &data, &value))
+ &data, &value)) {
goto exit;
+ }
return_value = zlib_adler32_impl(module, &data, value);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -428,14 +443,16 @@ zlib_crc32(PyModuleDef *module, PyObject *args)
unsigned int value = 0;
if (!PyArg_ParseTuple(args, "y*|I:crc32",
- &data, &value))
+ &data, &value)) {
goto exit;
+ }
return_value = zlib_crc32_impl(module, &data, value);
exit:
/* Cleanup for data */
- if (data.obj)
+ if (data.obj) {
PyBuffer_Release(&data);
+ }
return return_value;
}
@@ -443,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=8669ba9266c78433 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=9bd8a093baa653b2 input=a9049054013a1b77]*/