From 0c36eb546e6dd41f307118fe4a7dac894cf39d76 Mon Sep 17 00:00:00 2001
From: Zooko O'Whielacronx <zooko@zooko.com>
Date: Tue, 30 Jan 2007 15:58:45 -0700
Subject: [PATCH] pyfec: make it compatible with Python 2.4 as well as Python
 2.5

---
 pyfec/README.txt       | 3 ++-
 pyfec/fec/_fecmodule.c | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/pyfec/README.txt b/pyfec/README.txt
index 88d0f762..3285f090 100644
--- a/pyfec/README.txt
+++ b/pyfec/README.txt
@@ -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
diff --git a/pyfec/fec/_fecmodule.c b/pyfec/fec/_fecmodule.c
index 70c8b82c..e62e85c5 100644
--- a/pyfec/fec/_fecmodule.c
+++ b/pyfec/fec/_fecmodule.c
@@ -30,6 +30,10 @@
 #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;
-- 
2.45.2