rename falsly named files *.pyx in *.pxd ;-)
This commit is contained in:
1
doc/.gitignore
vendored
1
doc/.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
/build/
|
/build/
|
||||||
/doxygen/
|
/doxygen/
|
||||||
|
/build_dir.txt
|
||||||
|
19
python/obitools3/obidms/capidms.pxd
Normal file
19
python/obitools3/obidms/capidms.pxd
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
cdef extern from *:
|
||||||
|
ctypedef char* const_char_p "const char*"
|
||||||
|
|
||||||
|
cdef extern from "obidms.h" nogil:
|
||||||
|
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)
|
||||||
|
|
||||||
|
OBIDMS_p obi_dms(const_char_p name)
|
||||||
|
|
||||||
|
int obi_close_dms(OBIDMS_p dms)
|
||||||
|
|
||||||
|
cdef class OBIDMS:
|
||||||
|
cdef OBIDMS_p pointer
|
@ -1,19 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@ -1,27 +1,11 @@
|
|||||||
#from .capidms cimport *
|
#cython: language_level=3
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
|
from .capidms cimport *
|
||||||
|
|
||||||
cdef class OBIDMS:
|
cdef class OBIDMS:
|
||||||
|
|
||||||
cdef OBIDMS_p pointer
|
|
||||||
|
|
||||||
def __init__(self,name):
|
def __init__(self,name):
|
||||||
self.pointer = obi_create_dms(name)
|
self.pointer = obi_dms(name)
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
obi_close_dms(self.pointer)
|
obi_close_dms(self.pointer)
|
Reference in New Issue
Block a user