Skip to content

Commit

Permalink
Fix #82 by doing what the ctypes module does and defining PyLong_From…
Browse files Browse the repository at this point in the history
…Ssize_t to be PyInt_FromLong on Python 2.5.
  • Loading branch information
jamadden committed May 13, 2015
1 parent 80b5b33 commit 41d0974
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions greenlet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 41d0974

Please sign in to comment.