Skip to content

Expose Py_tp_vectorcall in the limited API #41

@encukou

Description

@encukou

tp_vectorcall is somewhat tricky to understand, but can bring significant speedups to wrapper code.

In python/cpython#100554, pybind11 and PyO3 maintainers ask to expose it for use with PyType_FromSpec/PyType_GetSlot and in limited API, and Wenzel sent a PR recently.

tp_vectorcall needs to match the behavior of a metaclass call, so exposing tp_vectorcall limits future changes to PyType_Type->tp_call. But, I think that's already something we can't really change.

Does a Py_tp_vectorcall slot sound reasonable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    voteThe WG is voting (or has voted)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions