Mercurial > hg
changeset 16384:8d821a173e4e
util.h: move Py_ssize_t bits from mpatch.c
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 10 Apr 2012 12:07:09 -0500 |
parents | f5dd179bfa4a |
children | e501f45b0eba |
files | mercurial/mpatch.c mercurial/util.h |
diffstat | 2 files changed, 8 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/mpatch.c Sun Apr 08 12:43:41 2012 -0700 +++ b/mercurial/mpatch.c Tue Apr 10 12:07:09 2012 -0500 @@ -26,16 +26,6 @@ #include "util.h" -/* Definitions to get compatibility with python 2.4 and earlier which - does not have Py_ssize_t. See also PEP 353. - Note: msvc (8 or earlier) does not have ssize_t, so we use Py_ssize_t. -*/ -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) -typedef int Py_ssize_t; -#define PY_SSIZE_T_MAX INT_MAX -#define PY_SSIZE_T_MIN INT_MIN -#endif - #ifdef _WIN32 #ifdef _MSC_VER /* msvc 6.0 has problems */
--- a/mercurial/util.h Sun Apr 08 12:43:41 2012 -0700 +++ b/mercurial/util.h Tue Apr 10 12:07:09 2012 -0500 @@ -102,8 +102,15 @@ #endif /* PY_VERSION_HEX */ #if (PY_VERSION_HEX < 0x02050000) +/* Definitions to get compatibility with python 2.4 and earlier which + does not have Py_ssize_t. See also PEP 353. + Note: msvc (8 or earlier) does not have ssize_t, so we use Py_ssize_t. +*/ typedef int Py_ssize_t; +#if !defined(PY_SSIZE_T_MIN) +#define PY_SSIZE_T_MAX INT_MAX +#define PY_SSIZE_T_MIN INT_MIN +#endif #endif #endif /* _HG_UTIL_H_ */ -