diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2009-11-15 16:18:58 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2009-11-15 16:18:58 (GMT) |
commit | 82864d1ab101d971e77b73cac9e994fd09cd796b (patch) | |
tree | 65335906c1a5f330660bb1f64d698198d50856d3 /Include | |
parent | d5b34d4597a7163edf20f831db620b0a4fe57d5d (diff) | |
download | cpython-82864d1ab101d971e77b73cac9e994fd09cd796b.zip cpython-82864d1ab101d971e77b73cac9e994fd09cd796b.tar.gz cpython-82864d1ab101d971e77b73cac9e994fd09cd796b.tar.bz2 |
Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
PyFormat_FromStringV and PyErr_Format.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/pyport.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Include/pyport.h b/Include/pyport.h index 8310132..aab349e 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -229,6 +229,22 @@ typedef Py_intptr_t Py_ssize_t; # endif #endif +/* PY_FORMAT_LONG_LONG is analogous to PY_FORMAT_SIZE_T above, but for + * the long long type instead of the size_t type. It's only available + * when HAVE_LONG_LONG is defined. The "high level" Python format + * functions listed above will interpret "lld" or "llu" correctly on + * all platforms. + */ +#ifdef HAVE_LONG_LONG +# ifndef PY_FORMAT_LONG_LONG +# if defined(MS_WIN64) || defined(MS_WINDOWS) +# define PY_FORMAT_LONG_LONG "I64" +# else +# error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG" +# endif +# endif +#endif + /* Py_LOCAL can be used instead of static to get the fastest possible calling * convention for functions that are local to a given module. * |