Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use '%lld' format for Py_ssize_t on Win64+MSVC if supported

  • Loading branch information...
commit b46f58d6348f5f858a1724d94213c5c619bf0ca5 1 parent ab9ca87
@scoder scoder authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 Cython/Utility/ModuleSetupCode.c
View
6 Cython/Utility/ModuleSetupCode.c
@@ -245,7 +245,13 @@
#endif
#if defined(_WIN64) && defined(_MSC_VER)
+ // CPython misdefines the format as "I", but the
+ // "ll" prefix is only supported in Py2.7 and later
+ #if PY_VERSION_HEX >= 0x02070000
+ #define CYTHON_FORMAT_SSIZE_T "ll"
+ #else
#define CYTHON_FORMAT_SSIZE_T "z"
+ #endif
#else
#define CYTHON_FORMAT_SSIZE_T PY_FORMAT_SIZE_T
#endif
Please sign in to comment.
Something went wrong with that request. Please try again.