summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r--Python/bltinmodule.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 8aa1ba0..a23bdc1 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -2,6 +2,7 @@
#include "Python.h"
#include "Python-ast.h"
+#include "internal/pystate.h"
#include "node.h"
#include "code.h"
@@ -2765,6 +2766,8 @@ _PyBuiltin_Init(void)
{
PyObject *mod, *dict, *debug;
+ const _PyCoreConfig *config = &_PyInterpreterState_GET_UNSAFE()->core_config;
+
if (PyType_Ready(&PyFilter_Type) < 0 ||
PyType_Ready(&PyMap_Type) < 0 ||
PyType_Ready(&PyZip_Type) < 0)
@@ -2823,7 +2826,7 @@ _PyBuiltin_Init(void)
SETBUILTIN("tuple", &PyTuple_Type);
SETBUILTIN("type", &PyType_Type);
SETBUILTIN("zip", &PyZip_Type);
- debug = PyBool_FromLong(Py_OptimizeFlag == 0);
+ debug = PyBool_FromLong(config->optimization_level == 0);
if (PyDict_SetItemString(dict, "__debug__", debug) < 0) {
Py_DECREF(debug);
return NULL;