summaryrefslogtreecommitdiff
path: root/Objects/complexobject.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-01-22 11:24:29 -0500
committerBenjamin Peterson <benjamin@python.org>2012-01-22 11:24:29 -0500
commitce798520778e9cb41adfdc4f0a3cb5085a0b11be (patch)
tree915ea477cc6dfaa170d851f0c54f72b07c544874 /Objects/complexobject.c
parentcd8991255c963858cc74f32d718e1d54987b26a0 (diff)
downloadcpython-git-ce798520778e9cb41adfdc4f0a3cb5085a0b11be.tar.gz
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/complexobject.c')
-rw-r--r--Objects/complexobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index 1e61b967ce..b73dc4b911 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -265,9 +265,9 @@ PyComplex_ImagAsDouble(PyObject *op)
static PyObject *
try_complex_special_method(PyObject *op) {
PyObject *f;
- static PyObject *complexstr;
+ _Py_IDENTIFIER(__complex__);
- f = _PyObject_LookupSpecial(op, "__complex__", &complexstr);
+ f = _PyObject_LookupSpecial(op, &PyId___complex__);
if (f) {
PyObject *res = PyObject_CallFunctionObjArgs(f, NULL);
Py_DECREF(f);