From 34605922dda6482da60e5a62f09ee05a28658fc3 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Thu, 7 Sep 2023 22:16:09 +0100 Subject: [PATCH] Added comment about workaround --- erfa/ufunc.c.templ | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/erfa/ufunc.c.templ b/erfa/ufunc.c.templ index be82771..8c6baec 100644 --- a/erfa/ufunc.c.templ +++ b/erfa/ufunc.c.templ @@ -17,6 +17,13 @@ #include "erfa.h" #include "erfaextra.h" +// On gcc<10 we can run into the following: +// +// error: dereferencing pointer to incomplete type 'PyTypeObject' +// +// As mentioned in https://github.com/numpy/numpy/issues/16970, +// the workaround is to define a fake _typeobject struct. + struct _typeobject { int dummy; };