STINNER Victor <[email protected]> added the comment:
Include/internal/pystate.h uses #include "pystate.h" to include
Include/pystate.h, but it tries to include itself (Include/internal/pystate.h)
which does nothing because of "#ifndef Py_INTERNAL_PYSTATE_H #define
Py_INTERNAL_PYSTATE_H ... #endif".
Remove the #ifndef #define to see the bug:
diff --git a/Include/internal/pystate.h b/Include/internal/pystate.h
index 38845d32ec..2ef023a9a5 100644
--- a/Include/internal/pystate.h
+++ b/Include/internal/pystate.h
@@ -1,5 +1,3 @@
-#ifndef Py_INTERNAL_PYSTATE_H
-#define Py_INTERNAL_PYSTATE_H
#ifdef __cplusplus
extern "C" {
#endif
@@ -222,4 +220,3 @@ PyAPI_FUNC(void) _PyInterpreterState_DeleteExceptMain(void);
#ifdef __cplusplus
}
#endif
-#endif /* !Py_INTERNAL_PYSTATE_H */
Compilation fails with:
In file included from ./Include/internal/pystate.h:5,
from ./Include/internal/pystate.h:5,
from ./Include/internal/pystate.h:5,
from ./Include/internal/pystate.h:5,
from ./Include/internal/pystate.h:5,
from ./Include/internal/pystate.h:5,
from ./Include/internal/pystate.h:5,
...
./Include/internal/pystate.h:5:21: error: #include nested too deeply
#include "pystate.h"
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue35081>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com