diff options
author | Thomas Heller <theller@ctypes.org> | 2006-06-10 21:17:58 (GMT) |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2006-06-10 21:17:58 (GMT) |
commit | eb6dcf6b0d9a43015a5303736952d90a654b1555 (patch) | |
tree | edfc03c1822f6e9caf72119bcdb0a36b4f65d799 /Modules | |
parent | 5218ab263a81ac93859bc1d3da789e297b24f970 (diff) | |
download | cpython-eb6dcf6b0d9a43015a5303736952d90a654b1555.zip cpython-eb6dcf6b0d9a43015a5303736952d90a654b1555.tar.gz cpython-eb6dcf6b0d9a43015a5303736952d90a654b1555.tar.bz2 |
Fix the second occurrence of the problematic printf format.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_ctypes/_ctypes.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 13ac414..5d29cda 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -1840,11 +1840,7 @@ unique_key(CDataObject *target, Py_ssize_t index) #if (PY_VERSION_HEX < 0x02050000) cp += sprintf(cp, ":%x", (int)target->b_index); #else -#ifdef MS_WIN32 - cp += sprintf(cp, ":%Ix", (size_t)target->b_index); -#else - cp += sprintf(cp, ":%zx", (size_t)target->b_index); -#endif + cp += sprintf(cp, ":%x", Py_SAFE_DOWNCAST(target->b_index, Py_ssize_t, int)); #endif target = target->b_base; } |