Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for libtiledb 1.8 C API change [no backport] #280

Merged
merged 1 commit into from
Mar 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tiledb/libtiledb.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -429,12 +429,12 @@ cdef extern from "tiledb/tiledb.h":
int tiledb_dimension_get_domain(
tiledb_ctx_t* ctx,
const tiledb_dimension_t* dim,
void** domain)
const void** domain)

int tiledb_dimension_get_tile_extent(
tiledb_ctx_t* ctx,
const tiledb_dimension_t* dim,
void** tile_extent)
const void** tile_extent)

# Array schema
int tiledb_array_schema_alloc(
Expand Down
8 changes: 4 additions & 4 deletions tiledb/libtiledb.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2284,7 +2284,7 @@ cdef class Dim(object):
:rtype: numpy scalar or np.timedelta64

"""
cdef void* tile_ptr = NULL
cdef const void* tile_ptr = NULL
check_error(self.ctx,
tiledb_dimension_get_tile_extent(self.ctx.ptr, self.ptr, &tile_ptr))
if tile_ptr == NULL:
Expand All @@ -2295,7 +2295,7 @@ cdef class Dim(object):
cdef int typeid = _numpy_typeid(tiledb_type)
assert(typeid != np.NPY_NOTYPE)
cdef np.ndarray tile_array =\
np.PyArray_SimpleNewFromData(1, shape, typeid, tile_ptr)
np.PyArray_SimpleNewFromData(1, shape, typeid, <void*>tile_ptr)

if _tiledb_type_is_datetime(tiledb_type):
# Coerce to np.int64
Expand Down Expand Up @@ -2324,7 +2324,7 @@ cdef class Dim(object):
:rtype: tuple(numpy scalar, numpy scalar)

"""
cdef void* domain_ptr = NULL
cdef const void* domain_ptr = NULL
check_error(self.ctx,
tiledb_dimension_get_domain(self.ctx.ptr,
self.ptr,
Expand All @@ -2336,7 +2336,7 @@ cdef class Dim(object):
cdef int typeid = _numpy_typeid(tiledb_type)
assert (typeid != np.NPY_NOTYPE)
cdef np.ndarray domain_array = \
np.PyArray_SimpleNewFromData(1, shape, typeid, domain_ptr)
np.PyArray_SimpleNewFromData(1, shape, typeid, <void*>domain_ptr)

if _tiledb_type_is_datetime(tiledb_type):
domain_array.dtype = _tiledb_type_to_datetime(tiledb_type).dtype
Expand Down