From 41d09745ff6218e15285695c57df5778d4bcb071 Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Wed, 13 May 2015 17:03:18 -0500 Subject: [PATCH] Fix #82 by doing what the ctypes module does and defining PyLong_FromSsize_t to be PyInt_FromLong on Python 2.5. --- greenlet.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/greenlet.c b/greenlet.c index 937d30f4..ea47a64b 100644 --- a/greenlet.c +++ b/greenlet.c @@ -90,6 +90,10 @@ The running greenlet's stack_start is undefined but not NULL. #endif #endif +#if PY_VERSION_HEX < 0x02060000 +#define PyLong_FromSsize_t PyInt_FromLong +#endif + #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #endif