Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows: fix size of ssize_t #57

Merged
merged 1 commit into from
Jul 31, 2024

Commits on Jul 30, 2024

  1. windows: fix size of ssize_t

    Previously, `long long` was used unconditionally to define `ssize_t` on
    Windows. This meant it was always a 64-bit value. However, typically
    the size type is a 32-bit value on 32-bit machines and 64-bit value on
    64-bit machines.
    
    This didn't cause any issues until it was used on 32-bit Windows build
    of `libvalkey-py`. CPython defines the `ssize_t` type as well as
    `libvalkey`, but it defines the size to be 32 bit on 32 bit machines
    which caused a compilation error.
    
    This commit changes the typedef to be `SSIZE_T` on Windows. Hence, it
    will be aligned with everything else.
    
    Signed-off-by: Mikhail Koviazin <[email protected]>
    mkmkme committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    892226c View commit details
    Browse the repository at this point in the history