projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab9ca87
)
use '%lld' format for Py_ssize_t on Win64+MSVC if supported
author
Stefan Behnel
<stefan_ml@behnel.de>
Fri, 31 Aug 2012 05:10:36 +0000
(07:10 +0200)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Fri, 31 Aug 2012 05:10:36 +0000
(07:10 +0200)
Cython/Utility/ModuleSetupCode.c
patch
|
blob
|
history
diff --git
a/Cython/Utility/ModuleSetupCode.c
b/Cython/Utility/ModuleSetupCode.c
index
4094249
..
ef3f6d2
100644
(file)
--- a/
Cython/Utility/ModuleSetupCode.c
+++ b/
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