Message120473
Modules/_ctypes/callproc.c:PyCArg_repr() uses sprintf(%qd, long long),
which is a GNU (and more?) extension. ISO C99 says %lld.
Instead, use "%" PY_FORMAT_LONG_LONG "d" from pyconfig.h/pyport.h.
Kills off #ifdef MS_WIN32 too. If Python must support C libraries
that handle %qd but not %lld, configure.in seems the right place.
Index: ./Modules/_ctypes/callproc.c
@@ -468,8 +468,3 @@ PyCArg_repr(PyCArgObject *self)
case 'Q':
- sprintf(buffer,
-#ifdef MS_WIN32
- "<cparam '%c' (%I64d)>",
-#else
- "<cparam '%c' (%qd)>",
-#endif
+ sprintf(buffer, "<cparam '%c' (%" PY_FORMAT_LONG_LONG "d)>",
self->tag, self->value.q);
pyport.h tests (defined(MS_WIN64) || defined(MS_WINDOWS)) instead of
#ifdef MS_WIN32 for when to use %I64d. I assume that's more up to date. |
|
Date |
User |
Action |
Args |
2010-11-05 08:38:09 | hfuru | set | recipients:
+ hfuru, theller |
2010-11-05 08:38:09 | hfuru | set | messageid: <1288946289.37.0.37131892978.issue10320@psf.upfronthosting.co.za> |
2010-11-05 08:38:06 | hfuru | link | issue10320 messages |
2010-11-05 08:38:05 | hfuru | create | |
|