]> granicus.if.org Git - python/commitdiff
_PyObject_FastCallDict(): avoid _Py_CheckFunctionResult()
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 24 Aug 2016 22:39:34 +0000 (00:39 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 24 Aug 2016 22:39:34 +0000 (00:39 +0200)
_PyObject_FastCallDict() only requires _Py_CheckFunctionResult() for the
slow-path. Other cases already check for the result.

Objects/abstract.c

index d271d9410a9821d2ba93f23ddd5a7dc62aa6417c..db9f926a367ca70aa87c20b79196bfa6f1cb3a40 100644 (file)
@@ -2299,9 +2299,9 @@ _PyObject_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs,
 
         result = (*call)(func, tuple, kwargs);
         Py_DECREF(tuple);
-    }
 
-    result = _Py_CheckFunctionResult(func, result, NULL);
+        result = _Py_CheckFunctionResult(func, result, NULL);
+    }
 
 exit:
     Py_LeaveRecursiveCall();