Skip to content

Commit 16faac7

Browse files
encukouneonene
andauthored
Call tp_init for argument validation
Co-authored-by: neonene <[email protected]>
1 parent f02bad6 commit 16faac7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Modules/_ctypes/_ctypes.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2073,6 +2073,9 @@ PyCSimpleType_init(PyObject *self, PyObject *args, PyObject *kwds)
20732073
PyMethodDef *ml;
20742074
struct fielddesc *fmt;
20752075

2076+
if (PyType_Type.tp_init(self, args, kwds) < 0) {
2077+
return -1;
2078+
}
20762079
if (PyObject_GetOptionalAttr(self, &_Py_ID(_type_), &proto) < 0) {
20772080
return -1;
20782081
}

0 commit comments

Comments
 (0)