New _Py_STDC_VERSION macro not available in pyport.h #160719
Copy link
Copy link
Open
Labels
Description
Bug report
The new _Py_STDC_VERSION macro introduced in 47163e5, is located in Include/pymacro.h and used in Include/pyport.h, but it seems pymacro.h is only ever included in Python.h, and after pyport.h:
Lines 67 to 71 in 210e7ab
| // Include Python header files | |
| #include "pyport.h" | |
| #include "exports.h" | |
| #include "pymacro.h" | |
| #include "pymath.h" |
So for example this branch will never be true because _Py_STDC_VERSION is undefined here:
Lines 494 to 495 in f4043ab
| # elif _Py_STDC_VERSION >= 201112L && !defined(__STDC_NO_THREADS__) | |
| # define _Py_thread_local _Thread_local |
CPython versions tested on:
3.15, CPython main branch
Operating systems tested on:
Linux
Linked PRs
Reactions are currently unavailable
Activity