From 844a5dc2c454a368e1571c9f426950d0c707b376 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Fri, 8 Sep 2023 14:02:17 +0100 Subject: [PATCH] Added note about malloc() --- erfa/ufunc.c.templ | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erfa/ufunc.c.templ b/erfa/ufunc.c.templ index 8c6baec..9edddb3 100644 --- a/erfa/ufunc.c.templ +++ b/erfa/ufunc.c.templ @@ -219,6 +219,8 @@ static void ufunc_loop_{{ func.pyname }}( {#- /* if needed, allocate memory for contiguous eraLDBODY copies */ #} {%- if func.user_dtype == 'dt_eraLDBODY' %} if (copy_b) { + // Note that we can't use PyArray_malloc here as it is an alias to PyMem_RawMalloc + // which is not available in the Python limited API _b = malloc(nb * sizeof(eraLDBODY)); if (_b == NULL) { PyErr_NoMemory();