Using PyInt_AsLong, instead of PyInt_As_Long, as it check for error.