Changed PyInt_AsLong to PyLong_AsLong as PyInt is not part of Python 3 anymore