mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
GH-90699: use statically allocated strings in typeobject.c (gh-93751)
This commit is contained in:
parent
ae1ca74513
commit
9331087966
3 changed files with 6 additions and 2 deletions
|
@ -3637,13 +3637,13 @@ PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module,
|
|||
|
||||
if (weaklistoffset) {
|
||||
type->tp_weaklistoffset = weaklistoffset;
|
||||
if (PyDict_DelItemString((PyObject *)type->tp_dict, "__weaklistoffset__") < 0) {
|
||||
if (PyDict_DelItem((PyObject *)type->tp_dict, &_Py_ID(__weaklistoffset__)) < 0) {
|
||||
goto finally;
|
||||
}
|
||||
}
|
||||
if (dictoffset) {
|
||||
type->tp_dictoffset = dictoffset;
|
||||
if (PyDict_DelItemString((PyObject *)type->tp_dict, "__dictoffset__") < 0) {
|
||||
if (PyDict_DelItem((PyObject *)type->tp_dict, &_Py_ID(__dictoffset__)) < 0) {
|
||||
goto finally;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue