diff options
| author | Thomas Heller <theller@ctypes.org> | 2006-06-10 21:07:19 +0000 |
|---|---|---|
| committer | Thomas Heller <theller@ctypes.org> | 2006-06-10 21:07:19 +0000 |
| commit | 7f143daf52414f21701f417e58361713879d60ba (patch) | |
| tree | b0a15e9f062c20e34024e8f336d7963d8b24450a /Modules | |
| parent | b5f4bf8ca70a650cd98266e180ea7a579d3d8028 (diff) | |
| download | cpython-7f143daf52414f21701f417e58361713879d60ba.tar.gz | |
Fix a wrong printf format.
Diffstat (limited to 'Modules')
| -rw-r--r-- | Modules/_ctypes/_ctypes.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 121c37c1e6..13ac4142e8 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -1827,12 +1827,7 @@ unique_key(CDataObject *target, Py_ssize_t index) #if (PY_VERSION_HEX < 0x02050000) cp += sprintf(cp, "%x", index); #else -#ifdef MS_WIN32 -/* MSVC does not understand the 'z' size specifier */ - cp += sprintf(cp, "%Ix", index); -#else - cp += sprintf(cp, "%zx", index); -#endif + cp += sprintf(cp, "%x", Py_SAFE_DOWNCAST(index, Py_ssize_t, int)); #endif while (target->b_base) { bytes_left = sizeof(string) - (cp - string) - 1; |
