diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2010-05-21 18:20:28 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-05-21 18:21:40 +0100 |
commit | 012b1c71f4eda3ae779da51d7d81c199d90f667d (patch) | |
tree | bcde5de1981ba2bd2fbf1ed4b83832919be18b4f | |
parent | 63e8da5abeaad1d2aa332fc41ad8f161fc567cdf (diff) | |
download | libguestfs-012b1c71f4eda3ae779da51d7d81c199d90f667d.tar.gz libguestfs-012b1c71f4eda3ae779da51d7d81c199d90f667d.tar.xz libguestfs-012b1c71f4eda3ae779da51d7d81c199d90f667d.zip |
Build workaround for Python 2.4.x in RHEL 5.
See:
http://www.python.org/dev/peps/pep-0353/#conversion-guidelines
-rwxr-xr-x | src/generator.ml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/generator.ml b/src/generator.ml index d2da8ec9..1212a5a9 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -9113,6 +9113,12 @@ and generate_python_c () = #define PY_SSIZE_T_CLEAN 1 #include <Python.h> +#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 <stdio.h> #include <stdlib.h> #include <assert.h> |