summaryrefslogtreecommitdiffstats
path: root/Include/pyport.h
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-11-16 17:00:11 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-11-16 17:00:11 (GMT)
commit6ce4a9a9f2d690e9ce7121154fd9cc04082d7f59 (patch)
tree4aacd6f6dd48c7fdd464cfb274108b5e5d16a725 /Include/pyport.h
parent260bd3e5578008682f009530faa615f74c6bcf82 (diff)
downloadcpython-6ce4a9a9f2d690e9ce7121154fd9cc04082d7f59.zip
cpython-6ce4a9a9f2d690e9ce7121154fd9cc04082d7f59.tar.gz
cpython-6ce4a9a9f2d690e9ce7121154fd9cc04082d7f59.tar.bz2
Merged revisions 76308 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r76308 | mark.dickinson | 2009-11-15 16:18:58 +0000 (Sun, 15 Nov 2009) | 3 lines Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString, PyFormat_FromStringV and PyErr_Format. ........
Diffstat (limited to 'Include/pyport.h')
-rw-r--r--Include/pyport.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/Include/pyport.h b/Include/pyport.h
index be15fe1..1adb5f0 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -219,6 +219,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.
*