diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-01-22 16:24:29 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-01-22 16:24:29 (GMT) |
commit | ce798520778e9cb41adfdc4f0a3cb5085a0b11be (patch) | |
tree | 915ea477cc6dfaa170d851f0c54f72b07c544874 /Objects/dictobject.c | |
parent | cd8991255c963858cc74f32d718e1d54987b26a0 (diff) | |
download | cpython-ce798520778e9cb41adfdc4f0a3cb5085a0b11be.zip cpython-ce798520778e9cb41adfdc4f0a3cb5085a0b11be.tar.gz cpython-ce798520778e9cb41adfdc4f0a3cb5085a0b11be.tar.bz2 |
use the static identifier api for looking up special methods
I had to move the static identifier code from unicodeobject.h to object.h in
order for this to work.
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r-- | Objects/dictobject.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index b799a0a..5a8a8a7 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -1142,10 +1142,8 @@ dict_subscript(PyDictObject *mp, register PyObject *key) if (!PyDict_CheckExact(mp)) { /* Look up __missing__ method if we're a subclass. */ PyObject *missing, *res; - static PyObject *missing_str = NULL; - missing = _PyObject_LookupSpecial((PyObject *)mp, - "__missing__", - &missing_str); + _Py_IDENTIFIER(__missing__); + missing = _PyObject_LookupSpecial((PyObject *)mp, &PyId___missing__); if (missing != NULL) { res = PyObject_CallFunctionObjArgs(missing, key, NULL); |