summaryrefslogtreecommitdiff
path: root/numpy/core/src/multiarray/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/src/multiarray/alloc.c')
-rw-r--r--numpy/core/src/multiarray/alloc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/numpy/core/src/multiarray/alloc.c b/numpy/core/src/multiarray/alloc.c
index 8b765aa95..d3b8612f7 100644
--- a/numpy/core/src/multiarray/alloc.c
+++ b/numpy/core/src/multiarray/alloc.c
@@ -88,7 +88,7 @@ _set_madvise_hugepage(PyObject *NPY_UNUSED(self), PyObject *enabled_obj)
* base function for data cache with 1 byte buckets and dimension cache with
* sizeof(npy_intp) byte buckets
*/
-static NPY_INLINE void *
+static inline void *
_npy_alloc_cache(npy_uintp nelem, npy_uintp esz, npy_uint msz,
cache_bucket * cache, void * (*alloc)(size_t))
{
@@ -126,7 +126,7 @@ _npy_alloc_cache(npy_uintp nelem, npy_uintp esz, npy_uint msz,
* return pointer p to cache, nelem is number of elements of the cache bucket
* size (1 or sizeof(npy_intp)) of the block pointed too
*/
-static NPY_INLINE void
+static inline void
_npy_free_cache(void * p, npy_uintp nelem, npy_uint msz,
cache_bucket * cache, void (*dealloc)(void *))
{
@@ -206,7 +206,7 @@ npy_free_cache_dim(void * p, npy_uintp sz)
}
/* Similar to array_dealloc in arrayobject.c */
-static NPY_INLINE void
+static inline void
WARN_NO_RETURN(PyObject* warning, const char * msg) {
if (PyErr_WarnEx(warning, msg, 1) < 0) {
PyObject * s;
@@ -364,7 +364,7 @@ PyDataMem_RENEW(void *ptr, size_t size)
// The default data mem allocator malloc routine does not make use of a ctx.
// It should be called only through PyDataMem_UserNEW
// since itself does not handle eventhook and tracemalloc logic.
-static NPY_INLINE void *
+static inline void *
default_malloc(void *NPY_UNUSED(ctx), size_t size)
{
return _npy_alloc_cache(size, 1, NBUCKETS, datacache, &malloc);
@@ -373,7 +373,7 @@ default_malloc(void *NPY_UNUSED(ctx), size_t size)
// The default data mem allocator calloc routine does not make use of a ctx.
// It should be called only through PyDataMem_UserNEW_ZEROED
// since itself does not handle eventhook and tracemalloc logic.
-static NPY_INLINE void *
+static inline void *
default_calloc(void *NPY_UNUSED(ctx), size_t nelem, size_t elsize)
{
void * p;
@@ -395,7 +395,7 @@ default_calloc(void *NPY_UNUSED(ctx), size_t nelem, size_t elsize)
// The default data mem allocator realloc routine does not make use of a ctx.
// It should be called only through PyDataMem_UserRENEW
// since itself does not handle eventhook and tracemalloc logic.
-static NPY_INLINE void *
+static inline void *
default_realloc(void *NPY_UNUSED(ctx), void *ptr, size_t new_size)
{
return realloc(ptr, new_size);
@@ -404,7 +404,7 @@ default_realloc(void *NPY_UNUSED(ctx), void *ptr, size_t new_size)
// The default data mem allocator free routine does not make use of a ctx.
// It should be called only through PyDataMem_UserFREE
// since itself does not handle eventhook and tracemalloc logic.
-static NPY_INLINE void
+static inline void
default_free(void *NPY_UNUSED(ctx), void *ptr, size_t size)
{
_npy_free_cache(ptr, size, NBUCKETS, datacache, &free);