bpo-11717: fix ssize_t redefinition error when targeting 32bit Windows app (GH-24479)

This commit is contained in:
Jozef Grajciar 2021-03-01 12:18:33 +01:00 committed by GitHub
parent 0242494a15
commit c994ffe695
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 181 additions and 179 deletions

View file

@ -101,7 +101,9 @@ typedef intptr_t Py_intptr_t;
* sizeof(size_t). C99 doesn't define such a thing directly (size_t is an
* unsigned integral type). See PEP 353 for details.
*/
#ifdef HAVE_SSIZE_T
#ifdef HAVE_PY_SSIZE_T
#elif HAVE_SSIZE_T
typedef ssize_t Py_ssize_t;
#elif SIZEOF_VOID_P == SIZEOF_SIZE_T
typedef Py_intptr_t Py_ssize_t;