mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Use Py_NewRef in Modules/_struct.c (GH-23981)
This commit is contained in:
@@ -1442,8 +1442,7 @@ s_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||
self = alloc_func(type, 0);
|
||||
if (self != NULL) {
|
||||
PyStructObject *s = (PyStructObject*)self;
|
||||
Py_INCREF(Py_None);
|
||||
s->s_format = Py_None;
|
||||
s->s_format = Py_NewRef(Py_None);
|
||||
s->s_codes = NULL;
|
||||
s->s_size = -1;
|
||||
s->s_len = -1;
|
||||
|
||||
Reference in New Issue
Block a user