# HG changeset patch # User Matt Mackall # Date 2012-04-10 21:53:29 # Node ID ee163a9cf37c5783b7707f3264e3be901255ce25 # Parent ee3f423df1b462476a634003aabf6d8bb3028ebc util.h: more Python 2.4 fixes diff --git a/mercurial/parsers.c b/mercurial/parsers.c --- a/mercurial/parsers.c +++ b/mercurial/parsers.c @@ -244,9 +244,9 @@ static PyObject *nullentry; 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): diff --git a/mercurial/util.h b/mercurial/util.h --- a/mercurial/util.h +++ b/mercurial/util.h @@ -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