mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
bpo-40268: Add _PyInterpreterState_GetConfig() (GH-19492)
Don't access PyInterpreterState.config member directly anymore, but use new functions: * _PyInterpreterState_GetConfig() * _PyInterpreterState_SetConfig() * _Py_GetConfig()
This commit is contained in:
parent
14d5331eb5
commit
da7933ecc3
19 changed files with 90 additions and 64 deletions
|
@ -9,6 +9,7 @@
|
|||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_object.h"
|
||||
#include "pycore_pystate.h"
|
||||
#include "structmember.h"
|
||||
#include "_iomodule.h"
|
||||
|
||||
|
@ -996,7 +997,7 @@ io_check_errors(PyObject *errors)
|
|||
PyInterpreterState *interp = _PyInterpreterState_GET_UNSAFE();
|
||||
#ifndef Py_DEBUG
|
||||
/* In release mode, only check in development mode (-X dev) */
|
||||
if (!interp->config.dev_mode) {
|
||||
if (!_PyInterpreterState_GetConfig(interp)->dev_mode) {
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue