Files
python-pygmx/pygmx/utility.pxd
2016-09-27 12:28:11 +02:00

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