changed int to c_int , for C calls.