[New-bugs-announce] [issue15827] Use "ll" for PY_FORMAT_SIZE_T on Win64

Stefan Behnel report at bugs.python.org
Fri Aug 31 07:01:21 CEST 2012

New submission from Stefan Behnel:

Formatting support for "lld"/"llu" was added (I think) in issue 7228, but the definition of PY_FORMAT_SIZE_T wasn't adapted. We are getting test output failures in Cython on Win64 when formatting error messages using the "Id" format, as defined by pyport.h:

#   if SIZEOF_SIZE_T == SIZEOF_INT && !defined(__APPLE__)
#       define PY_FORMAT_SIZE_T ""
#       define PY_FORMAT_SIZE_T "l"
#   elif defined(MS_WINDOWS)
#       define PY_FORMAT_SIZE_T "I"
#   else
#       error "This platform's pyconfig.h needs to define PY_FORMAT_SIZE_T"
#   endif

The "%Id" format is not being resolved in the error messages and shows up in the output instead.

NumPy uses "lld" when available, starting with Py2.7:


Shouldn't PY_FORMAT_SIZE_T become "ll" on Win64 directly?

components: Interpreter Core
messages: 169500
nosy: scoder
priority: normal
severity: normal
status: open
title: Use "ll" for PY_FORMAT_SIZE_T on Win64
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list