gh-140634: Fix a reference counting bug in os.sched_param.__reduce__() (GH-140667)

This commit is contained in:
Serhiy Storchaka
2025-10-27 21:42:32 +02:00
committed by GitHub
parent a716091227
commit 364ae607d8
3 changed files with 10 additions and 1 deletions

View File

@@ -8724,7 +8724,7 @@ os_sched_param_impl(PyTypeObject *type, PyObject *sched_priority)
static PyObject *
os_sched_param_reduce(PyObject *self, PyObject *Py_UNUSED(dummy))
{
return Py_BuildValue("(O(N))", Py_TYPE(self), PyStructSequence_GetItem(self, 0));
return Py_BuildValue("(O(O))", Py_TYPE(self), PyStructSequence_GetItem(self, 0));
}
static PyMethodDef os_sched_param_reduce_method = {