[Python-checkins] r46835 - python/trunk/Modules/_ctypes/_ctypes.c
thomas.heller
python-checkins at python.org
Sat Jun 10 23:17:58 CEST 2006
Author: thomas.heller
Date: Sat Jun 10 23:17:58 2006
New Revision: 46835
Modified:
python/trunk/Modules/_ctypes/_ctypes.c
Log:
Fix the second occurrence of the problematic printf format.
Modified: python/trunk/Modules/_ctypes/_ctypes.c
==============================================================================
--- python/trunk/Modules/_ctypes/_ctypes.c (original)
+++ python/trunk/Modules/_ctypes/_ctypes.c Sat Jun 10 23:17:58 2006
@@ -1840,11 +1840,7 @@
#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;
}
More information about the Python-checkins
mailing list