Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
Closed
Description
Bug report
I have a change within aproject that includes a native extension which fails to compile with 3.12.0b1:
In file included from echion/coremodule.cc:22: In file included from ./echion/dict.h:7: In file included from /Users/gabriele/.pyenv/versions/3.12.0b1/include/python3.12/internal/pycore_dict.h:13: In file included from /Users/gabriele/.pyenv/versions/3.12.0b1/include/python3.12/internal/pycore_runtime.h:16: In file included from /Users/gabriele/.pyenv/versions/3.12.0b1/include/python3.12/internal/pycore_global_objects.h:11: /Users/gabriele/.pyenv/versions/3.12.0b1/include/python3.12/internal/pycore_gc.h:84:19: error: static declaration of 'PyObject_GC_IsFinalized' follows non-static declaration static inline int _PyGC_FINALIZED(PyObject *op) { ^ /Users/gabriele/.pyenv/versions/3.12.0b1/include/python3.12/cpython/objimpl.h:85:30: note: expanded from macro '_PyGC_FINALIZED' # define _PyGC_FINALIZED(o) PyObject_GC_IsFinalized(o) ^ /Users/gabriele/.pyenv/versions/3.12.0b1/include/python3.12/objimpl.h:209:17: note: previous declaration is here PyAPI_FUNC(int) PyObject_GC_IsFinalized(PyObject *);
I didn't look too deep into what changed here, but my guess would be that the macro should drop the_
prefix, i.e.
# define PyGC_FINALIZED(o) PyObject_GC_IsFinalized(o)
since it seems thatPyObject_GC_IsFinalized
is part of the API. The same code compiles fine with older versions of Python.
Your environment
MacOS Ventura 13.3.1
Python 3.12.0b1