Minor changes in code to improve readability and fix C compilation

warnings
This commit is contained in:
Celine Mercier
2015-11-10 14:37:58 +01:00
parent 410e2e02a0
commit 6579566c6e
5 changed files with 17 additions and 22 deletions

View File

@ -32,7 +32,7 @@ cdef class OBIDMS_column:
cdef OBIDMS_column_p pointer
cdef OBIDMS dms
cdef str data_type # TODO keep as OBIType_t? both?
cdef str data_type
cdef str dms_name
cdef str column_name
cdef index_t nb_elements_per_line

View File

@ -61,7 +61,8 @@ cdef class OBIDMS :
# Fill structure and create or open the DMS
self.dms_name = dms_name
self.pointer = obi_dms(<const_char_p> dms_name_b)
# TODO: test pointer and raise Exception("Failed opening or creating an OBIDMS")
if self.pointer == NULL :
raise Exception("Failed opening or creating an OBIDMS")
cpdef close(self) :

View File

@ -16,13 +16,8 @@ cdef extern from "obidmscolumn.h" nogil:
cdef extern from "obitypes.h" nogil:
enum OBIType: # TODO je sais pas si ça sert de declarer le contenu de l'enum
OBI_VOID = 0,
OBI_INT,
OBI_FLOAT,
OBI_BOOL,
OBI_CHAR,
OBI_IDX
enum OBIType:
pass
ctypedef OBIType OBIType_t