27 lines
609 B
Cython
27 lines
609 B
Cython
# C-API in gromacs/utility
|
|
|
|
from libc.stdint cimport int64_t
|
|
|
|
#cdef extern from "inttypes.h":
|
|
ctypedef unsigned long __int64
|
|
ctypedef int64_t gmx_int64_t
|
|
|
|
cdef extern from "gromacs/utility/basedefinitions.h":
|
|
ctypedef int gmx_bool
|
|
ctypedef __int64 gmx_int64_t
|
|
|
|
cdef extern from "gromacs/utility/real.h":
|
|
ctypedef double real
|
|
|
|
cdef extern from "gromacs/utility/futil.h":
|
|
ctypedef gmx_int64_t gmx_off_t
|
|
|
|
cdef extern from "gromacs/utility/smalloc.h":
|
|
void snew(void *ptr, int nelem)
|
|
|
|
|
|
cdef inline cstr(instr):
|
|
if isinstance(instr, str):
|
|
instr = instr.encode()
|
|
return instr
|