From: Thomas Heller Date: Sat, 10 Jun 2006 21:17:58 +0000 (+0000) Subject: Fix the second occurrence of the problematic printf format. X-Git-Tag: v2.5b1~149 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb6dcf6b0d9a43015a5303736952d90a654b1555;p=python Fix the second occurrence of the problematic printf format. --- 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; }