commit | 2fb6b4999527f2e491d34a58f7eb87d97ffa050e | [log] [tgz] |
---|---|---|
author | Phil Howard <phil@gadgetoid.com> | Sun Feb 28 11:10:55 2016 +0000 |
committer | Phil Howard <phil@gadgetoid.com> | Sun Feb 28 11:10:55 2016 +0000 |
tree | 9df458c5022c780830b7a785ee321fcc20f688dc | |
parent | 8e29d40b0235ef1efe06e5611b8f8b93e713a4f0 [diff] [blame] |
Fix for python3
diff --git a/wiringpi.i b/wiringpi.i index 0988f69..736fd89 100644 --- a/wiringpi.i +++ b/wiringpi.i
@@ -1,6 +1,11 @@ %module wiringpi2 %{ +#if PY_MAJOR_VERSION >= 3 +#define PyInt_AS_LONG PyLong_AsLong +#define PyString_FromStringAndSize PyBytes_FromStringAndSize +#endif + #include "WiringPi/wiringPi/wiringPi.h" #include "WiringPi/wiringPi/wiringPiI2C.h" #include "WiringPi/wiringPi/wiringPiSPI.h"