bpo-40268: Rename _PyInterpreterState_GET_UNSAFE() (GH-19509)
Rename _PyInterpreterState_GET_UNSAFE() to _PyInterpreterState_GET() for consistency with _PyThreadState_GET() and to have a shorter name (help to fit into 80 columns). Add also "assert(tstate != NULL);" to the function.
This commit is contained in:
@@ -498,7 +498,7 @@ pymain_repl(PyConfig *config, PyCompilerFlags *cf, int *exitcode)
|
||||
static void
|
||||
pymain_run_python(int *exitcode)
|
||||
{
|
||||
PyInterpreterState *interp = _PyInterpreterState_GET_UNSAFE();
|
||||
PyInterpreterState *interp = _PyInterpreterState_GET();
|
||||
/* pymain_run_stdin() modify the config */
|
||||
PyConfig *config = (PyConfig*)_PyInterpreterState_GetConfig(interp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user