Mercurial > genshi > genshi-test
changeset 723:5f8a5ad19835
Fix compilation for Python 2.3 and 2.4.
Submitted by: Armin Ronacher
author | jruigrok |
---|---|
date | Mon, 21 Apr 2008 19:17:26 +0000 |
parents | 9eb7211d5a64 |
children | e695f9763a03 |
files | genshi/_speedups.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/genshi/_speedups.c +++ b/genshi/_speedups.c @@ -14,6 +14,12 @@ #include <Python.h> #include <structmember.h> +#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;