Skip to content

Commit

Permalink
gh-120834: fix over-allocation in PyGenObject, PyCoroObject, PyAsyncG…
Browse files Browse the repository at this point in the history
…enObject. (#120941)
  • Loading branch information
iritkatriel authored Jun 24, 2024
1 parent 3481848 commit 8ac08f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Objects/genobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ static PyAsyncMethods gen_as_async = {
PyTypeObject PyGen_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"generator", /* tp_name */
sizeof(PyGenObject), /* tp_basicsize */
offsetof(PyGenObject, gi_iframe.localsplus), /* tp_basicsize */
sizeof(PyObject *), /* tp_itemsize */
/* methods */
(destructor)gen_dealloc, /* tp_dealloc */
Expand Down Expand Up @@ -1164,7 +1164,7 @@ static PyAsyncMethods coro_as_async = {
PyTypeObject PyCoro_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"coroutine", /* tp_name */
sizeof(PyCoroObject), /* tp_basicsize */
offsetof(PyCoroObject, cr_iframe.localsplus),/* tp_basicsize */
sizeof(PyObject *), /* tp_itemsize */
/* methods */
(destructor)gen_dealloc, /* tp_dealloc */
Expand Down Expand Up @@ -1579,7 +1579,7 @@ static PyAsyncMethods async_gen_as_async = {
PyTypeObject PyAsyncGen_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"async_generator", /* tp_name */
sizeof(PyAsyncGenObject), /* tp_basicsize */
offsetof(PyAsyncGenObject, ag_iframe.localsplus), /* tp_basicsize */
sizeof(PyObject *), /* tp_itemsize */
/* methods */
(destructor)gen_dealloc, /* tp_dealloc */
Expand Down

0 comments on commit 8ac08f3

Please sign in to comment.