diff options
author | adphrost <104581013+adphrost@users.noreply.github.com> | 2022-09-15 15:42:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-15 15:42:37 (GMT) |
commit | a41ed975e863ae0ca435783596f14f8492d62f8d (patch) | |
tree | b87ceae5a7c55e1131a7cdf02b0cda2b6ca41eaf /Doc/c-api | |
parent | e37ac5fbb6de593521cf218aa05bc58a45c5a7c9 (diff) | |
download | cpython-a41ed975e863ae0ca435783596f14f8492d62f8d.zip cpython-a41ed975e863ae0ca435783596f14f8492d62f8d.tar.gz cpython-a41ed975e863ae0ca435783596f14f8492d62f8d.tar.bz2 |
GH-91049: Introduce set vectorcall field API for PyFunctionObject (GH-92257)
Co-authored-by: Andrew Frost <adfrost@fb.com>
Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/function.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/c-api/function.rst b/Doc/c-api/function.rst index 56c1839..df88e85 100644 --- a/Doc/c-api/function.rst +++ b/Doc/c-api/function.rst @@ -83,6 +83,15 @@ There are a few functions specific to Python functions. Raises :exc:`SystemError` and returns ``-1`` on failure. +.. c:function:: void PyFunction_SetVectorcall(PyFunctionObject *func, vectorcallfunc vectorcall) + + Set the vectorcall field of a given function object *func*. + + Warning: extensions using this API must preserve the behavior + of the unaltered (default) vectorcall function! + + .. versionadded:: 3.12 + .. c:function:: PyObject* PyFunction_GetClosure(PyObject *op) Return the closure associated with the function object *op*. This can be ``NULL`` |