blob: 250b26a5cc1de67162cd252ba8890e81f61f2bf0 (
plain)
1
2
3
4
5
6
|
from cython.cimports.libc.stdlib import atoi
@cython.cfunc
def parse_charptr_to_py_int(s: cython.p_char):
assert s is not cython.NULL, "byte string value is NULL"
return atoi(s) # note: atoi() has no error detection!
|