changes to PyAPI to make it run on 64-bit linux
pascal: length vs sizeof