]> git.rkrishnan.org Git - tahoe-lafs/zfec.git/commitdiff
pyfec: make it compatible with Python 2.4 as well as Python 2.5
authorZooko O'Whielacronx zooko@zooko.com <zooko@zooko.com>
Tue, 30 Jan 2007 21:58:45 +0000 (03:28 +0530)
committerZooko O'Whielacronx zooko@zooko.com <zooko@zooko.com>
Tue, 30 Jan 2007 21:58:45 +0000 (03:28 +0530)
darcs-hash:e7fbe6da45db3d221ff833c7b316407de439c889

pyfec/README.txt
pyfec/fec/_fecmodule.c

index 88d0f7623a813f081b3aa7852497281117d95ee7..3285f090889c91e4fb3bfb11fac3ffeb7c398cee 100644 (file)
@@ -128,7 +128,8 @@ reading a file and encoding it piece by piece.
 
  * Dependencies
 
-A C compiler is required.  For the Python API, Python version 2.5 is required.
+A C compiler is required.  For the Python API, we have tested it with Python
+v2.4 and v2.5.
 
 
  * Performance Measurements
index 73c69d2f0433b348aae7cfb55a53dfd456f4a563..e930db06a19c308d6e7466db8c494e17232b1b55 100644 (file)
 #include <Python.h>
 #include <structmember.h>
 
+#if (PY_VERSION_HEX < 0x02050000)
+typedef int Py_ssize_t;
+#endif
+
 #include "fec.h"
 
 static PyObject *py_fec_error;