This commit adds the METH_FASTCALL method calling convention
(with the exception of omitting the const
classifier for
the arguments).
Beginning with Python 3.10, METH_FASTCALL
is not part of the
limited API anymore, it was first available (although undocumented)
in Python 3.7.
Closes #3357 (closed)
--HG-- branch : meth-fastcall
I Am not 100% sure about the reference counting, I assume the decref
is only needed for the tuple that is created using PyTuple_New
and the rest "just works". I seem to recall that the const classifier is tricky in PyPy (I could not figure it out), so I assumed it is OK to drop it?
Just opening in case you are happy with it, not sure if it quite hits the mark with how one tuple is created using the string and the other not, etc.