PEP 590: remove new METH_VECTORCALL flag (#1048)

This commit is contained in:
Jeroen Demeyer 2019-05-18 14:20:29 +02:00 committed by Mark Shannon
parent 4e0a7443f4
commit 502c87cde8
1 changed files with 0 additions and 12 deletions

View File

@ -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
-----------