[Python-checkins] r46834 - python/trunk/Modules/_ctypes/_ctypes.c
thomas.heller
python-checkins at python.org
Sat Jun 10 23:07:20 CEST 2006
Author: thomas.heller
Date: Sat Jun 10 23:07:19 2006
New Revision: 46834
Modified:
python/trunk/Modules/_ctypes/_ctypes.c
Log:
Fix a wrong 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:07:19 2006
@@ -1827,12 +1827,7 @@
#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;
More information about the Python-checkins
mailing list