typo on python 2 string conversion in obj_to_cstr_len