From f55864b828abd1bbfebc0a5fcf96057d46b1a760 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 21 May 2010 18:20:28 +0100 Subject: [PATCH] Build workaround for Python 2.4.x in RHEL 5. See: http://www.python.org/dev/peps/pep-0353/#conversion-guidelines (cherry picked from commit 012b1c71f4eda3ae779da51d7d81c199d90f667d) --- src/generator.ml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/generator.ml b/src/generator.ml index 116fb01..4b7313b 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -8784,6 +8784,12 @@ and generate_python_c () = pr "\ #include +#if PY_VERSION_HEX < 0x02050000 +typedef int Py_ssize_t; +#define PY_SSIZE_T_MAX INT_MAX +#define PY_SSIZE_T_MIN INT_MIN +#endif + #include #include #include -- 1.8.3.1