Alexey Izbyshev <izbys...@ispras.ru> added the comment: Victor, you moved declarations of some functions to other headers, but didn't include the new headers into files that implement the functions in some cases. For example, _PyGILState_Init was moved into Include/internal/pycore_lifecycle.h in a1c249c40517917d2e0971d55aea8d14a44b2cc8, but it's implemented in Python/pystate.c, which doesn't include the new header.
This may lead to subtle problems because the compiler can't check that signatures of the declaration and the implementation match. I suggest to use -Wmissing-prototypes and -Wmissing-declarations to detect such situations: ../../cpython/Python/pystate.c: At top level: ../../cpython/Python/pystate.c:968:1: warning: no previous prototype for ‘_PyGILState_Init’ [-Wmissing-prototypes] _PyGILState_Init(PyInterpreterState *i, PyThreadState *t) ^~~~~~~~~~~~~~~~ ../../cpython/Python/pystate.c:988:1: warning: no previous prototype for ‘_PyGILState_Fini’ [-Wmissing-prototypes] _PyGILState_Fini(void) ^~~~~~~~~~~~~~~~ Sadly, there are many other similar issues in Python now, but you can at least compare the number of warnings before and after your changes. ---------- nosy: +izbyshev _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35081> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com