mirror of
https://github.com/python/cpython.git
synced 2026-06-07 18:33:16 +00:00
gh-150027: Avoid copying during construction of frozenset objects (GH-150028)
This commit is contained in:
parent
29415c071f
commit
409fa8e1f3
11 changed files with 116 additions and 22 deletions
|
|
@ -892,6 +892,7 @@ pycore_init_builtins(PyThreadState *tstate)
|
|||
interp->common_consts[CONSTANT_FALSE] = Py_False;
|
||||
interp->common_consts[CONSTANT_MINUS_ONE] =
|
||||
(PyObject *)&_PyLong_SMALL_INTS[_PY_NSMALLNEGINTS - 1];
|
||||
interp->common_consts[CONSTANT_BUILTIN_FROZENSET] = (PyObject *)&PyFrozenSet_Type;
|
||||
for (int i = 0; i < NUM_COMMON_CONSTANTS; i++) {
|
||||
assert(interp->common_consts[i] != NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue