From e431ae7098e76137158b21f46637bfab54a2e248 Mon Sep 17 00:00:00 2001
From: "Zooko O'Whielacronx zooko@zooko.com" <zooko@zooko.com>
Date: Wed, 31 Jan 2007 03:28:45 +0530
Subject: [PATCH] pyfec: make it compatible with Python 2.4 as well as Python
 2.5

darcs-hash:e7fbe6da45db3d221ff833c7b316407de439c889
---
 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 88d0f76..3285f09 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 73c69d2..e930db0 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