git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Build workaround for Python 2.4.x in RHEL 5.
[libguestfs.git]
/
src
/
generator.ml
diff --git
a/src/generator.ml
b/src/generator.ml
index
116fb01
..
4b7313b
100755
(executable)
--- a/
src/generator.ml
+++ b/
src/generator.ml
@@
-8784,6
+8784,12
@@
and generate_python_c () =
pr "\
#include <Python.h>
pr "\
#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>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>