[Python-checkins] cpython: Issue #19512: __build_class() builtin now uses an identifier for the
victor.stinner
python-checkins at python.org
Thu Nov 7 00:03:00 CET 2013
http://hg.python.org/cpython/rev/40c73ccaee95
changeset: 86975:40c73ccaee95
user: Victor Stinner <victor.stinner at gmail.com>
date: Wed Nov 06 22:46:51 2013 +0100
summary:
Issue #19512: __build_class() builtin now uses an identifier for the "metaclass" string
files:
Python/bltinmodule.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -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);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list