use identifier api

This commit is contained in:
Benjamin Peterson 2012-03-20 23:17:04 -04:00
parent b4dcb10514
commit 302e7902c8
1 changed files with 2 additions and 1 deletions

View File

@ -1837,10 +1837,11 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
if (PyGen_CheckExact(x)) {
retval = _PyGen_Send((PyGenObject *)x, u);
} else {
_Py_IDENTIFIER(send);
if (u == Py_None)
retval = PyIter_Next(x);
else
retval = PyObject_CallMethod(x, "send", "O", u);
retval = _PyObject_CallMethodId(x, &PyId_send, "O", u);
}
Py_DECREF(u);
if (!retval) {