From 750140c278276b7896ecea83f0362816e317d5ae Mon Sep 17 00:00:00 2001 From: Lars Immisch Date: Sun, 10 May 2015 01:02:10 +0000 Subject: [PATCH] Fix compatibility with Python 2.7 --- alsaaudio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/alsaaudio.c b/alsaaudio.c index 7bc9ebe..f32f273 100644 --- a/alsaaudio.c +++ b/alsaaudio.c @@ -20,6 +20,9 @@ #define PyLong_Check PyInt_Check #define PyLong_AS_LONG PyInt_AS_LONG #endif +#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION == 7 +#define PyLong_AS_LONG PyInt_AS_LONG +#endif #include #include