c-ext: long → int
wrapper: changed logging system to python.logging