• Victor Stinner's avatar
    bpo-35081: Add _PyThreadState_GET() internal macro (GH-10266) · 50b48572
    Victor Stinner yazdı
    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.
    50b48572
Adı
Son kayıt (commit)
Son güncelleme
..
Python.asdl Loading commit data...
acceler.c Loading commit data...
asdl.py Loading commit data...
asdl_c.py Loading commit data...
bitset.c Loading commit data...
firstsets.c Loading commit data...
grammar.c Loading commit data...
grammar1.c Loading commit data...
listnode.c Loading commit data...
metagrammar.c Loading commit data...
myreadline.c Loading commit data...
node.c Loading commit data...
parser.c Loading commit data...
parser.h Loading commit data...
parsetok.c Loading commit data...
parsetok_pgen.c Loading commit data...
pgen.c Loading commit data...
pgenmain.c Loading commit data...
printgrammar.c Loading commit data...
tokenizer.c Loading commit data...
tokenizer.h Loading commit data...
tokenizer_pgen.c Loading commit data...