From 5218ab263a81ac93859bc1d3da789e297b24f970 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Sat, 10 Jun 2006 21:07:19 +0000 Subject: [PATCH] Fix a wrong printf format. --- Modules/_ctypes/_ctypes.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 121c37c1e6c..13ac4142e8e 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;