summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r--Python/bltinmodule.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index b0be671..6069e41 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -34,6 +34,7 @@ int Py_HasFileSystemDefaultEncoding = 0;
_Py_IDENTIFIER(fileno);
_Py_IDENTIFIER(flush);
+_Py_IDENTIFIER(__builtins__);
static PyObject *
builtin___build_class__(PyObject *self, PyObject *args, PyObject *kwds)
@@ -771,9 +772,9 @@ builtin_eval(PyObject *self, PyObject *args)
return NULL;
}
- if (PyDict_GetItemString(globals, "__builtins__") == NULL) {
- if (PyDict_SetItemString(globals, "__builtins__",
- PyEval_GetBuiltins()) != 0)
+ if (_PyDict_GetItemId(globals, &PyId___builtins__) == NULL) {
+ if (_PyDict_SetItemId(globals, &PyId___builtins__,
+ PyEval_GetBuiltins()) != 0)
return NULL;
}
@@ -846,9 +847,9 @@ builtin_exec(PyObject *self, PyObject *args)
locals->ob_type->tp_name);
return NULL;
}
- if (PyDict_GetItemString(globals, "__builtins__") == NULL) {
- if (PyDict_SetItemString(globals, "__builtins__",
- PyEval_GetBuiltins()) != 0)
+ if (_PyDict_GetItemId(globals, &PyId___builtins__) == NULL) {
+ if (_PyDict_SetItemId(globals, &PyId___builtins__,
+ PyEval_GetBuiltins()) != 0)
return NULL;
}