diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-11-06 21:46:51 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-11-06 21:46:51 (GMT) |
commit | ae9f161b43df37e69ba4715b50862fdbf077e245 (patch) | |
tree | d7e90813f10e2bedd6fd672c13abeedb11f3c988 /Python | |
parent | 090543736fa86c676252de7a44e6a7c6f347164e (diff) | |
download | cpython-ae9f161b43df37e69ba4715b50862fdbf077e245.zip cpython-ae9f161b43df37e69ba4715b50862fdbf077e245.tar.gz cpython-ae9f161b43df37e69ba4715b50862fdbf077e245.tar.bz2 |
Issue #19512: __build_class() builtin now uses an identifier for the "metaclass" string
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bltinmodule.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 6eb0ee7..6d9864d 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -44,6 +44,7 @@ builtin___build_class__(PyObject *self, PyObject *args, PyObject *kwds) Py_ssize_t nargs; int isclass; _Py_IDENTIFIER(__prepare__); + _Py_IDENTIFIER(metaclass); assert(args != NULL); if (!PyTuple_Check(args)) { @@ -83,10 +84,10 @@ builtin___build_class__(PyObject *self, PyObject *args, PyObject *kwds) Py_DECREF(bases); return NULL; } - meta = PyDict_GetItemString(mkw, "metaclass"); + meta = _PyDict_GetItemId(mkw, &PyId_metaclass); if (meta != NULL) { Py_INCREF(meta); - if (PyDict_DelItemString(mkw, "metaclass") < 0) { + if (_PyDict_DelItemId(mkw, &PyId_metaclass) < 0) { Py_DECREF(meta); Py_DECREF(mkw); Py_DECREF(bases); |