Skip to content

Commit

Permalink
BLD: reintroduce compatibility shim for compiling against numpy 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Apr 11, 2024
1 parent 0b758b5 commit 1ef2e23
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions erfa/ufunc.c.templ
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
#include "erfa.h"
#include "erfaextra.h"

// Backported NumPy 2 API (can be removed if numpy 2 is required)
#if NPY_ABI_VERSION < 0x02000000
#define PyDataType_ELSIZE(descr) ((descr)->elsize)
#endif

// On gcc<10 we can run into the following:
//
// error: dereferencing pointer to incomplete type 'PyTypeObject'
Expand Down

0 comments on commit 1ef2e23

Please sign in to comment.