cpython/Parser
Victor Stinner 50b48572d9
bpo-35081: Add _PyThreadState_GET() internal macro (GH-10266)
If Py_BUILD_CORE is defined, the PyThreadState_GET() macro access
_PyRuntime which comes from the internal pycore_state.h header.
Public headers must not require internal headers.

Move PyThreadState_GET() and _PyInterpreterState_GET_UNSAFE() from
Include/pystate.h to Include/internal/pycore_state.h, and rename
PyThreadState_GET() to _PyThreadState_GET() there.

The PyThreadState_GET() macro of pystate.h is now redefined when
pycore_state.h is included, to use the fast _PyThreadState_GET().

Changes:

* Add _PyThreadState_GET() macro
* Replace "PyThreadState_GET()->interp" with
  _PyInterpreterState_GET_UNSAFE()
* Replace PyThreadState_GET() with _PyThreadState_GET() in internal C
  files (compiled with Py_BUILD_CORE defined), but keep
  PyThreadState_GET() in the public header files.
* _testcapimodule.c: replace PyThreadState_GET() with
  PyThreadState_Get(); the module is not compiled with Py_BUILD_CORE
  defined.
* pycore_state.h now requires Py_BUILD_CORE to be defined.
2018-11-01 01:51:40 +01:00
..
acceler.c Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
asdl.py Add ast.Constant 2016-01-26 00:40:57 +01:00
asdl_c.py bpo-32892: Use ast.Constant instead of specific constant AST types. (GH-9445) 2018-09-27 17:42:37 +03:00
bitset.c Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
firstsets.c Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
grammar.c properly free memory in pgen 2016-09-18 18:00:25 -07:00
grammar1.c bpo-31338 (#3374) 2017-09-14 18:13:16 -07:00
listnode.c Use NULL rather than 0. (#778) 2017-03-23 17:53:47 +02:00
metagrammar.c Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
myreadline.c bpo-35081: Add _PyThreadState_GET() internal macro (GH-10266) 2018-11-01 01:51:40 +01:00
node.c replace PY_SIZE_MAX with SIZE_MAX 2016-09-07 09:26:18 -07:00
parser.c Issue #26130: Remove redundant variable 's' from Parser/parser.c 2016-03-28 00:45:28 +03:00
parser.h bpo-32150: Expand tabs to spaces in C files. (#4583) 2017-11-28 17:56:10 +02:00
parsetok.c bpo-34683: Make SyntaxError column offsets consistently 1-indexed (gh-9338) 2018-09-24 14:12:49 -07:00
parsetok_pgen.c Issue #10785: Store the filename as Unicode in the Python parser. 2011-04-05 00:39:01 +02:00
pgen.c properly free memory in pgen 2016-09-18 18:00:25 -07:00
pgenmain.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
printgrammar.c closes bpo-34646: Remove PyAPI_* macros from declarations. (GH-9218) 2018-09-12 12:06:42 -07:00
Python.asdl bpo-32892: Use ast.Constant instead of specific constant AST types. (GH-9445) 2018-09-27 17:42:37 +03:00
tokenizer.c Remove unneeded PyUnicode_READY() in tokenizer.c (GH-9114) 2018-09-10 09:27:31 +03:00
tokenizer.h tokenizer: Remove unused tabs options (#4422) 2017-11-17 01:25:47 -08:00
tokenizer_pgen.c