[Python-checkins] cpython: _PyObject_FastCallDict(): avoid _Py_CheckFunctionResult()

victor.stinner python-checkins at python.org
Wed Aug 24 18:41:15 EDT 2016


https://hg.python.org/cpython/rev/f4dcb5ff3ecd
changeset:   102901:f4dcb5ff3ecd
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Thu Aug 25 00:39:34 2016 +0200
summary:
  _PyObject_FastCallDict(): avoid _Py_CheckFunctionResult()

_PyObject_FastCallDict() only requires _Py_CheckFunctionResult() for the
slow-path. Other cases already check for the result.

files:
  Objects/abstract.c |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Objects/abstract.c b/Objects/abstract.c
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2299,10 +2299,10 @@
 
         result = (*call)(func, tuple, kwargs);
         Py_DECREF(tuple);
+
+        result = _Py_CheckFunctionResult(func, result, NULL);
     }
 
-    result = _Py_CheckFunctionResult(func, result, NULL);
-
 exit:
     Py_LeaveRecursiveCall();
 

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list