Mercurial > cpython-lru_cache-weakref
diff Python/bltinmodule.c @ 86975:40c73ccaee95
Issue #19512: __build_class() builtin now uses an identifier for the "metaclass" string
| author | Victor Stinner <victor.stinner@gmail.com> |
|---|---|
| date | Wed, 06 Nov 2013 22:46:51 +0100 |
| parents | 954167ce92a3 |
| children | 6a1ce1fd1fc0 |
line wrap: on
line diff
--- a/Python/bltinmodule.c Wed Nov 06 22:41:44 2013 +0100 +++ b/Python/bltinmodule.c Wed Nov 06 22:46:51 2013 +0100 @@ -44,6 +44,7 @@ Py_ssize_t nargs; int isclass; _Py_IDENTIFIER(__prepare__); + _Py_IDENTIFIER(metaclass); assert(args != NULL); if (!PyTuple_Check(args)) { @@ -83,10 +84,10 @@ 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);
