diff options
author | Victor Stinner <vstinner@python.org> | 2021-10-11 22:18:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-11 22:18:26 (GMT) |
commit | fb8f208a4ddb38eedee71f9ecd0f22058802dab1 (patch) | |
tree | 5968ef94c8b27221c2e1fba4e1c27e5b3c8e6053 /Include/cpython | |
parent | 61190e092b8258ede92ac543bb39bad0f7168104 (diff) | |
download | cpython-fb8f208a4ddb38eedee71f9ecd0f22058802dab1.zip cpython-fb8f208a4ddb38eedee71f9ecd0f22058802dab1.tar.gz cpython-fb8f208a4ddb38eedee71f9ecd0f22058802dab1.tar.bz2 |
bpo-45439: _PyObject_Call() only checks tp_vectorcall_offset once (GH-28890)
Add _PyVectorcall_Call() helper function.
Add "assert(PyCallable_Check(callable));" to PyVectorcall_Call(),
similar check than PyVectorcall_Function().
Diffstat (limited to 'Include/cpython')
-rw-r--r-- | Include/cpython/abstract.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/cpython/abstract.h b/Include/cpython/abstract.h index db85021..ea269f7 100644 --- a/Include/cpython/abstract.h +++ b/Include/cpython/abstract.h @@ -71,6 +71,7 @@ PyVectorcall_Function(PyObject *callable) return NULL; } assert(PyCallable_Check(callable)); + offset = tp->tp_vectorcall_offset; assert(offset > 0); memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); |