8000 gh-100227: Make the Global Interned Dict Safe for Isolated Interpreters by ericsnowcurrently · Pull Request #102858 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-100227: Make the Global Interned Dict Safe for Isolated Interpreters #102858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next Next commit
Initialize the interned dict in _PyUnicode_InitGlobalObjects().
  • Loading branch information
ericsnowcurrently committed Mar 20, 2023
commit 9420a1cc39ae90cf86a6c482e51ed2e3eccab3eb
3 changes: 1 addition & 2 deletions Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -14533,13 +14533,12 @@ _PyUnicode_InitGlobalObjects(PyInterpreterState *interp)
return _PyStatus_OK();
}

// Initialize the global interned dict
/* Initialize the global interned dict. */
PyObject *interned = PyDict_New();
if (interned == NULL) {
PyErr_Clear();
return _PyStatus_ERR("failed to create interned dict");
}

set_interned_dict(interned);

/* Intern statically allocated string identifiers and deepfreeze strings.
Expand Down
0