# HG changeset patch # User jruigrok # Date 1208805446 0 # Node ID c2c22f1d26f4c4e09f08e970dd4951bce21d71a0 # Parent 1ec766e4f753df8e86715a84f7de383fa6dd3bcf Fix compilation for Python 2.3 and 2.4. Submitted by: Armin Ronacher diff --git a/genshi/_speedups.c b/genshi/_speedups.c --- a/genshi/_speedups.c +++ b/genshi/_speedups.c @@ -14,6 +14,12 @@ #include #include +#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 + static PyObject *amp1, *amp2, *lt1, *lt2, *gt1, *gt2, *qt1, *qt2; static PyObject *stripentities, *striptags;