From eb6dcf6b0d9a43015a5303736952d90a654b1555 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Sat, 10 Jun 2006 21:17:58 +0000 Subject: [PATCH] Fix the second occurrence of the problematic printf format. --- Modules/_ctypes/_ctypes.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 13ac4142e8..5d29cda261 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; } -- 2.50.1