Skip to content

C API: Add Py_GetBuildInType and Py_GetBuildInTypeBorrowed #148643

@bschoenmaeckers

Description

@bschoenmaeckers

Feature or enhancement

Proposal:

Currently, the C API exports all build-in types as a static data export. This limits how alternative python implementations can implement static types.

I propose that we export a Py_GetBuildInTypeBorrowed function that works similar to the Py_GetConstantBorrowed function. And use these in the type check macro's when compiling for the limited api.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions