We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c71be45 commit b61bddbCopy full SHA for b61bddb
Modules/_struct.c
@@ -1794,6 +1794,8 @@ static int
1794
Struct___init___impl(PyStructObject *self, PyObject *format)
1795
/*[clinic end generated code: output=b8e80862444e92d0 input=192a4575a3dde802]*/
1796
{
1797
+ int ret = 0;
1798
+
1799
if (PyUnicode_Check(format)) {
1800
format = PyUnicode_AsASCIIString(format);
1801
if (format == NULL)
@@ -1814,10 +1816,8 @@ Struct___init___impl(PyStructObject *self, PyObject *format)
1814
1816
1815
1817
Py_SETREF(self->s_format, format);
1818
- if (prepare_s(self)) {
- return -1;
1819
- }
1820
- return 0;
+ ret = prepare_s(self);
+ return ret;
1821
}
1822
1823
static int
0 commit comments