Skip to content

add missing tp_as_mapping, tp_as_sequence and tp_as_number functions #1197

@undingen

Description

@undingen

Some of our builtin types don't overwrite all of this functions.
This means the perf will be slightly worse because we will call into the slot wrapper which will than do an attribute lookup instead of just calling the function pointer.
One example is our list type which does not initialize the tp_as_mapping function pointers.
They are therefore initialized to slot_sq_length, etc.. while we should overwrite them with custom implementations like list_length.

Metadata

Metadata

Assignees

No one assigned

    Labels

    old_v1Issues leftover from the old v1 seriesprobably easy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions