summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>2022-06-12 16:38:18 (GMT)
committerGitHub <noreply@github.com>2022-06-12 16:38:18 (GMT)
commit93310879665368445f95df2f3d9be7fb82435248 (patch)
treee9ae1523092021d4979ef93ac77e9f83eb15e87d /Objects
parentae1ca74513e792b09c8057a87aa28715b5c9f50b (diff)
downloadcpython-93310879665368445f95df2f3d9be7fb82435248.zip
cpython-93310879665368445f95df2f3d9be7fb82435248.tar.gz
cpython-93310879665368445f95df2f3d9be7fb82435248.tar.bz2
GH-90699: use statically allocated strings in typeobject.c (gh-93751)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 18094bd..c6df50d 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -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;
}
}