Skip to content

Avoid using long and prefer using long long or explicitly-sized integer types? #2609

Open
@oddbookworm

Description

@oddbookworm

A thought occurred to me:
int doesn't have a specific size. Per the C spec (I'm using this freely available draft of C17 https://web.archive.org/web/20181230041359if_/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf, page 31 in section 6.2.5, subsection 5):

A "plain" int object has the natural size suggested by the architecture of the execution environment (large enough to contain any value in the range INT_MIN to INT_MAX as defined in the header <limits.h>

So, technically, an int could be different for different machines even running the same OS. Theoretically then, we could run into a situation with pygame-ce actually doing different things.

Would this be worth investigating?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions