summaryrefslogtreecommitdiffstats
path: root/Objects/moduleobject.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-13 01:04:28 (GMT)
committerGitHub <noreply@github.com>2020-04-13 01:04:28 (GMT)
commitda7933ecc30e37b119756cb02b89a6ad99db22e0 (patch)
treee6c7227f2ded7b7354fb027342fa977f70808d10 /Objects/moduleobject.c
parent14d5331eb5e6c38be12bad421bd59ad0fac9e448 (diff)
downloadcpython-da7933ecc30e37b119756cb02b89a6ad99db22e0.zip
cpython-da7933ecc30e37b119756cb02b89a6ad99db22e0.tar.gz
cpython-da7933ecc30e37b119756cb02b89a6ad99db22e0.tar.bz2
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()
Diffstat (limited to 'Objects/moduleobject.c')
-rw-r--r--Objects/moduleobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c
index f02ca75..30adc92 100644
--- a/Objects/moduleobject.c
+++ b/Objects/moduleobject.c
@@ -572,7 +572,7 @@ _PyModule_ClearDict(PyObject *d)
Py_ssize_t pos;
PyObject *key, *value;
- int verbose = _PyInterpreterState_GET_UNSAFE()->config.verbose;
+ int verbose = _Py_GetConfig()->verbose;
/* First, clear only names starting with a single underscore */
pos = 0;
@@ -659,7 +659,7 @@ module___init___impl(PyModuleObject *self, PyObject *name, PyObject *doc)
static void
module_dealloc(PyModuleObject *m)
{
- int verbose = _PyInterpreterState_GET_UNSAFE()->config.verbose;
+ int verbose = _Py_GetConfig()->verbose;
PyObject_GC_UnTrack(m);
if (verbose && m->md_name) {