From 2d99a849b913c564e510acb743192663e3a12c2d Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Sat, 26 Apr 2008 15:18:27 +0000 Subject: [PATCH 1/1] compatibility to python 2.4. --- lib/base/ebase.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/base/ebase.cpp b/lib/base/ebase.cpp index 038e5ad1..a79b1d4a 100644 --- a/lib/base/ebase.cpp +++ b/lib/base/ebase.cpp @@ -187,6 +187,11 @@ int eMainloop::processOneEvent(unsigned int twisted_timeout, PyObject **res, ePy if (additional) { +#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) + typedef int Py_ssize_t; +# define PY_SSIZE_T_MAX INT_MAX +# define PY_SSIZE_T_MIN INT_MIN +#endif PyObject *key, *val; Py_ssize_t pos=0; while (PyDict_Next(additional, &pos, &key, &val)) { -- 2.30.2