From 6970a28691c275352186af1de1d49bcf66472e98 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Wed, 18 Oct 2023 13:38:30 +0100 Subject: [PATCH] Avoid redefining _typeobject when using PyPy since PyPy includes its own definition --- erfa/ufunc.c.templ | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erfa/ufunc.c.templ b/erfa/ufunc.c.templ index 9edddb3..c3d8619 100644 --- a/erfa/ufunc.c.templ +++ b/erfa/ufunc.c.templ @@ -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" \