Cython API: now using const char* instead of char* for the type of

values read from OBI_STR columns
This commit is contained in:
Celine Mercier
2017-04-06 15:15:20 +02:00
parent ad8de80353
commit 5de9e0de51

View File

@ -13,7 +13,7 @@ from ...capi.obiview cimport obi_get_str_with_elt_name_and_col_p_in_view, \
obi_set_str_with_elt_idx_and_col_p_in_view
from ...capi.obierrno cimport obi_errno
from ...capi.obitypes cimport OBI_STR, OBIStr_NA
from ...capi.obitypes cimport OBI_STR, OBIStr_NA, const_char_p
cdef class Column_str(Column):
@ -32,7 +32,7 @@ cdef class Column_str(Column):
cpdef object get_line(self, index_t line_nb):
cdef char* value
cdef const_char_p value
cdef object result
global obi_errno
value = obi_get_str_with_elt_idx_and_col_p_in_view(self._view.pointer(), self.pointer(), line_nb, 0)
@ -58,7 +58,7 @@ cdef class Column_str(Column):
cdef class Column_multi_elts_str(Column_multi_elts):
cpdef object get_item(self, index_t line_nb, object elt_id) :
cdef char* value
cdef const_char_p value
cdef object result
global obi_errno
if type(elt_id) == int :
@ -76,7 +76,7 @@ cdef class Column_multi_elts_str(Column_multi_elts):
cpdef object get_line(self, index_t line_nb) :
cdef char* value
cdef const_char_p value
cdef object value_in_result
cdef dict result
cdef index_t i