[Python-checkins] cpython: use identifier api

benjamin.peterson python-checkins at python.org
Wed Mar 21 19:26:21 CET 2012


http://hg.python.org/cpython/rev/5fae5be91849
changeset: 75852:5fae5be91849
parent: 75843:f1e1b32d6301
user: Benjamin Peterson <benjamin at python.org>
date: Tue Mar 20 23:17:04 2012 -0400
summary:
 use identifier api
files:
 Python/ceval.c | 3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Python/ceval.c b/Python/ceval.c
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1837,10 +1837,11 @@
 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) {
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /