changeset 723:c2c22f1d26f4 trunk

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 1ec766e4f753
children 85ff66a8f453
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;
 
Copyright (C) 2012-2017 Edgewall Software