Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support settingtp_vectorcall for heap types #100554

Closed
Labels
@davidhewitt

Description

@davidhewitt

Feature or enhancement

Thetp_vectorcall slot can be used with static types to define a more efficient implementation of__new__ /__init__. This slot does not have a typedef in typeslots.h, so it cannot currently be set forPyType_FromSpec or read usingPyType_GetSlot.

In 3.12 other vectorcall functionality looks set to stabilise, so please consider adding aPy_tp_vectorcall typedef and allow heap types to set / get this member.

Pitch

Adding the ability fortp_vectorcall to be used in the limited API enables extension types to make use of the vectorcall optimisation in more functionality.

Previous discussion

I see in#85784 thattp_vectorcall is deliberately inaccessible withPyType_GetSlot because it is not part of the limited API.

If there is support for this proposal, I am happy to have a first stab at implementation.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp