Skip to content

Commit f254ec7

Browse files
Use a static str for "__builtins__".
1 parent 6c8da8d commit f254ec7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/crossinterp_data_lookup.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,8 +702,8 @@ _PyFunction_FromXIData(_PyXIData_t *xidata)
702702
return NULL;
703703
}
704704
PyThreadState *tstate = _PyThreadState_GET();
705-
if (PyDict_SetItemString(globals, "__builtins__",
706-
tstate->interp->builtins) < 0)
705+
if (PyDict_SetItem(globals, &_Py_ID(__builtins__),
706+
tstate->interp->builtins) < 0)
707707
{
708708
Py_DECREF(code);
709709
Py_DECREF(globals);

0 commit comments

Comments
 (0)