From 9f69f76704952a33c9b0ced19c55014789f1572f Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Tue, 26 May 2015 14:17:08 +0200 Subject: [PATCH] Few change on the obidms package --- python/obitools3/obidms/capidms.pyd | 8 ++++++-- python/obitools3/obidms/capidms.pyx | 23 +++++++++++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) 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)