From ce798520778e9cb41adfdc4f0a3cb5085a0b11be Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 22 Jan 2012 11:24:29 -0500 Subject: 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. --- Objects/complexobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Objects/complexobject.c') 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); -- cgit v1.2.1