From 74c483675223fa162522b14e15e8a4d23c1dedc3 Mon Sep 17 00:00:00 2001 From: Isaiah Norton Date: Mon, 9 Mar 2020 12:25:18 -0400 Subject: [PATCH] Update for libtiledb 1.8 C API change --- tiledb/libtiledb.pxd | 4 ++-- tiledb/libtiledb.pyx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tiledb/libtiledb.pxd b/tiledb/libtiledb.pxd index 9be8f4fd09..4ef884e171 100644 --- a/tiledb/libtiledb.pxd +++ b/tiledb/libtiledb.pxd @@ -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( diff --git a/tiledb/libtiledb.pyx b/tiledb/libtiledb.pyx index 966dfafc57..bcebdaa778 100644 --- a/tiledb/libtiledb.pyx +++ b/tiledb/libtiledb.pyx @@ -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: @@ -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, tile_ptr) if _tiledb_type_is_datetime(tiledb_type): # Coerce to np.int64 @@ -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, @@ -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, domain_ptr) if _tiledb_type_is_datetime(tiledb_type): domain_array.dtype = _tiledb_type_to_datetime(tiledb_type).dtype