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();