mirror of https://github.com/python/cpython
gh-120834: fix over-allocation in PyGenObject, PyCoroObject, PyAsyncGenObject. (#120941)
This commit is contained in:
parent
348184845a
commit
8ac08f36fe
|
@ -813,7 +813,7 @@ static PyAsyncMethods gen_as_async = {
|
||||||
PyTypeObject PyGen_Type = {
|
PyTypeObject PyGen_Type = {
|
||||||
PyVarObject_HEAD_INIT(&PyType_Type, 0)
|
PyVarObject_HEAD_INIT(&PyType_Type, 0)
|
||||||
"generator", /* tp_name */
|
"generator", /* tp_name */
|
||||||
sizeof(PyGenObject), /* tp_basicsize */
|
offsetof(PyGenObject, gi_iframe.localsplus), /* tp_basicsize */
|
||||||
sizeof(PyObject *), /* tp_itemsize */
|
sizeof(PyObject *), /* tp_itemsize */
|
||||||
/* methods */
|
/* methods */
|
||||||
(destructor)gen_dealloc, /* tp_dealloc */
|
(destructor)gen_dealloc, /* tp_dealloc */
|
||||||
|
@ -1164,7 +1164,7 @@ static PyAsyncMethods coro_as_async = {
|
||||||
PyTypeObject PyCoro_Type = {
|
PyTypeObject PyCoro_Type = {
|
||||||
PyVarObject_HEAD_INIT(&PyType_Type, 0)
|
PyVarObject_HEAD_INIT(&PyType_Type, 0)
|
||||||
"coroutine", /* tp_name */
|
"coroutine", /* tp_name */
|
||||||
sizeof(PyCoroObject), /* tp_basicsize */
|
offsetof(PyCoroObject, cr_iframe.localsplus),/* tp_basicsize */
|
||||||
sizeof(PyObject *), /* tp_itemsize */
|
sizeof(PyObject *), /* tp_itemsize */
|
||||||
/* methods */
|
/* methods */
|
||||||
(destructor)gen_dealloc, /* tp_dealloc */
|
(destructor)gen_dealloc, /* tp_dealloc */
|
||||||
|
@ -1579,7 +1579,7 @@ static PyAsyncMethods async_gen_as_async = {
|
||||||
PyTypeObject PyAsyncGen_Type = {
|
PyTypeObject PyAsyncGen_Type = {
|
||||||
PyVarObject_HEAD_INIT(&PyType_Type, 0)
|
PyVarObject_HEAD_INIT(&PyType_Type, 0)
|
||||||
"async_generator", /* tp_name */
|
"async_generator", /* tp_name */
|
||||||
sizeof(PyAsyncGenObject), /* tp_basicsize */
|
offsetof(PyAsyncGenObject, ag_iframe.localsplus), /* tp_basicsize */
|
||||||
sizeof(PyObject *), /* tp_itemsize */
|
sizeof(PyObject *), /* tp_itemsize */
|
||||||
/* methods */
|
/* methods */
|
||||||
(destructor)gen_dealloc, /* tp_dealloc */
|
(destructor)gen_dealloc, /* tp_dealloc */
|
||||||
|
|
Loading…
Reference in New Issue