mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
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>
This commit is contained in:
parent
e37ac5fbb6
commit
a41ed975e8
9 changed files with 115 additions and 3 deletions
|
@ -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``
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue