Mercurial > hg
changeset 16393:ee163a9cf37c
util.h: more Python 2.4 fixes
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 10 Apr 2012 16:53:29 -0500 |
parents | ee3f423df1b4 |
children | f0f7f3fab315 |
files | mercurial/parsers.c mercurial/util.h |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/parsers.c Mon Apr 09 13:48:45 2012 -0700 +++ b/mercurial/parsers.c Tue Apr 10 16:53:29 2012 -0500 @@ -244,9 +244,9 @@ static long inline_scan(indexObject *self, const char **offsets); #if LONG_MAX == 0x7fffffffL -static const char *tuple_format = "Kiiiiiis#"; +static char *tuple_format = "Kiiiiiis#"; #else -static const char *tuple_format = "kiiiiiis#"; +static char *tuple_format = "kiiiiiis#"; #endif /* RevlogNG format (all in big endian, data may be inlined):
--- a/mercurial/util.h Mon Apr 09 13:48:45 2012 -0700 +++ b/mercurial/util.h Tue Apr 10 16:53:29 2012 -0500 @@ -107,6 +107,9 @@ Note: msvc (8 or earlier) does not have ssize_t, so we use Py_ssize_t. */ typedef int Py_ssize_t; +typedef Py_ssize_t (*lenfunc)(PyObject *); +typedef PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t); + #if !defined(PY_SSIZE_T_MIN) #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN