Skip to content

Commit

Permalink
Avoid redefining _typeobject when using PyPy since PyPy includes its …
Browse files Browse the repository at this point in the history
…own definition
  • Loading branch information
astrofrog committed Oct 18, 2023
1 parent da319b5 commit 6970a28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion erfa/ufunc.c.templ
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@
// As mentioned in https://github.com/numpy/numpy/issues/16970,
// the workaround is to define a fake _typeobject struct.

struct _typeobject {
#ifndef PYPY_VERSION
typedef struct _typeobject {
int dummy;
};
#endif

#define MODULE_DOCSTRING \
"Ufunc wrappers of the ERFA routines.\n\n" \
Expand Down

0 comments on commit 6970a28

Please sign in to comment.