PEP 590: remove new METH_VECTORCALL flag (#1048)
This commit is contained in:
parent
4e0a7443f4
commit
502c87cde8
12
pep-0590.rst
12
pep-0590.rst
|
@ -145,18 +145,6 @@ The following functions or macros are added to the C API:
|
|||
return the actual number of arguments.
|
||||
Currently equivalent to ``nargs & ~PY_VECTORCALL_ARGUMENTS_OFFSET``.
|
||||
|
||||
New ``METH_VECTORCALL`` flag
|
||||
----------------------------
|
||||
|
||||
A new constant ``METH_VECTORCALL`` is added for specifying ``PyMethodDef`` structs.
|
||||
It means that the C function has the type ``PyObject *(*call) (PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwname)``.
|
||||
This should be the preferred flag for new functions, as this avoids a wrapper function.
|
||||
|
||||
**NOTE**: the numerical value of ``METH_VECTORCALL`` is unspecified
|
||||
and it may have more than 1 bit set.
|
||||
It must not combined with any of the existing flags
|
||||
``METH_VARARGS``, ``METH_FASTCALL``, ``METH_NOARGS``, ``METH_O`` or ``METH_KEYWORDS``.
|
||||
|
||||
Subclassing
|
||||
-----------
|
||||
|
||||
|
|
Loading…
Reference in New Issue