mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +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
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include "Python.h"
|
||||
#include "importdl.h"
|
||||
#include "pycore_pystate.h"
|
||||
|
||||
#if defined(__hp9000s300)
|
||||
#define FUNCNAME_PATTERN "_%.20s_%.200s"
|
||||
|
@ -21,7 +20,7 @@ dl_funcptr _PyImport_FindSharedFuncptr(const char *prefix,
|
|||
const char *pathname, FILE *fp)
|
||||
{
|
||||
int flags = BIND_FIRST | BIND_DEFERRED;
|
||||
int verbose = _PyInterpreterState_GET_UNSAFE()->config.verbose;
|
||||
int verbose = _Py_GetConfig()->verbose;
|
||||
if (verbose) {
|
||||
flags = BIND_FIRST | BIND_IMMEDIATE |
|
||||
BIND_NONFATAL | BIND_VERBOSE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue