summaryrefslogtreecommitdiffstats
path: root/bindings/python
diff options
context:
space:
mode:
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);