diff --git a/python/obitools3/obidms/capidms.pyd b/python/obitools3/obidms/capidms.pyd index f3ae937..eee5219 100644 --- a/python/obitools3/obidms/capidms.pyd +++ b/python/obitools3/obidms/capidms.pyd @@ -5,11 +5,15 @@ cdef extern from *: cdef extern from "obidms.h": struct OBIDMS_t: pass - ctypedef OBIDMS_t* OBIDMS_p + + ctypedef OBIDMS_t* OBIDMS_p + OBIDMS_p obi_create_dms(const_char_p name) + OBIDMS_p obi_open_dms(const_char_p name) + int obi_close_dms(OBIDMS_p dms) -class OBIDMS: +cdef class OBIDMS: cdef OBIDMS_p pointer \ No newline at end of file diff --git a/python/obitools3/obidms/capidms.pyx b/python/obitools3/obidms/capidms.pyx index 7f9f47b..e96b365 100644 --- a/python/obitools3/obidms/capidms.pyx +++ b/python/obitools3/obidms/capidms.pyx @@ -1,6 +1,25 @@ -from capidms cimport * +#from .capidms cimport * + +cdef extern from *: + ctypedef char* const_char_p "const char*" + +cdef extern from "obidms.h": + struct OBIDMS_t: + pass + + ctypedef OBIDMS_t* OBIDMS_p + + OBIDMS_p obi_create_dms(const_char_p name) + + OBIDMS_p obi_open_dms(const_char_p name) + + int obi_close_dms(OBIDMS_p dms) + + +cdef class OBIDMS: + + cdef OBIDMS_p pointer -class OBIDMS: def __init__(self,name): self.pointer = obi_create_dms(name)