summaryrefslogtreecommitdiffstats
path: root/bindings/python
diff options
context:
space:
mode:
authorJerome Schneider <jschneider@entrouvert.com>2009-04-17 14:12:43 +0000
committerJerome Schneider <jschneider@entrouvert.com>2009-04-17 14:12:43 +0000
commit827d79af7c59fdefed211e14463841cd18e8ec71 (patch)
treed483c9df9c2f265e0fa03bb8549f98d445a2b918 /bindings/python
parentdac53715ea615eae6c76fbac23813cdd820b989e (diff)
downloadlasso-827d79af7c59fdefed211e14463841cd18e8ec71.tar.gz
lasso-827d79af7c59fdefed211e14463841cd18e8ec71.tar.xz
lasso-827d79af7c59fdefed211e14463841cd18e8ec71.zip
Fix python 2.4 binding build
Diffstat (limited to 'bindings/python')
-rw-r--r--bindings/python/wrapper_top.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bindings/python/wrapper_top.c b/bindings/python/wrapper_top.c
index 333d4b88..8c2d584a 100644
--- a/bindings/python/wrapper_top.c
+++ b/bindings/python/wrapper_top.c
@@ -6,6 +6,12 @@
#include "../../lasso/debug.h"
#include "../../lasso/utils.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
+
GQuark lasso_wrapper_key;
PyMODINIT_FUNC init_lasso(void);