Skip to content

Avoid C-specific Types #10

Open
Open
@encukou

Description

@encukou

In new API, let's avoid types whose size/layout depends on the C compiler.

  • Bad: long, bitfields, enums
  • OK:
    • size_t, intptr_t, which depend directly on the platform
    • int for small ranges (as replacement for enum) -- here practicality beats purity
  • Good: int32_t etc.

In the existing API, we might maybe want to e.g. replace long by int32_t, and declare an ABI break on the few platforms where sizeof(long) != sizeof(int32_t).

Metadata

Metadata

Assignees

No one assigned

    Labels

    guidelineTo be included in guidelines PEP

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions