mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
bpo-40521: Make the empty frozenset per interpreter (GH-21068)
Each interpreter now has its own empty frozenset singleton.
This commit is contained in:
parent
b4e85cadfb
commit
261cfedf76
5 changed files with 24 additions and 19 deletions
|
|
@ -238,6 +238,8 @@ struct _is {
|
|||
/* Using a cache is very effective since typically only a single slice is
|
||||
created and then deleted again. */
|
||||
PySliceObject *slice_cache;
|
||||
// The empty frozenset is a singleton.
|
||||
PyObject *empty_frozenset;
|
||||
|
||||
struct _Py_tuple_state tuple;
|
||||
struct _Py_list_state list;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ extern void _PyFrame_Fini(PyThreadState *tstate);
|
|||
extern void _PyDict_Fini(PyThreadState *tstate);
|
||||
extern void _PyTuple_Fini(PyThreadState *tstate);
|
||||
extern void _PyList_Fini(PyThreadState *tstate);
|
||||
extern void _PySet_Fini(void);
|
||||
extern void _PySet_Fini(PyThreadState *tstate);
|
||||
extern void _PyBytes_Fini(void);
|
||||
extern void _PyFloat_Fini(PyThreadState *tstate);
|
||||
extern void _PySlice_Fini(PyThreadState *tstate);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue