File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -196,10 +196,9 @@ intern_strings(PyObject *tuple)
196196 return 0 ;
197197}
198198
199-
200199/* Intern constants. In the default build, this interns selected string
201- constants. In the free-threaded build, this also interns non-string
202- constants. */
200+ constants. In the free-threaded build, this also interns non-string
201+ constants. */
203202static int
204203intern_constants (PyObject * tuple , int * modified )
205204{
@@ -213,6 +212,7 @@ intern_constants(PyObject *tuple, int *modified)
213212 continue ;
214213 }
215214#if !defined(Py_GIL_DISABLED )
215+ // borrowed reference
216216 PyObject * interned = _Py_hashtable_get (INTERNED_STRINGS , v );
217217 if (interned == NULL ) {
218218 interned = PyDict_GetItemWithError (get_interned_dict (interp ), v );
@@ -308,7 +308,7 @@ intern_constants(PyObject *tuple, int *modified)
308308 else if (interned != v ) {
309309 PyTuple_SET_ITEM (tuple , i , interned );
310310 Py_SETREF (v , interned );
311- _constants_tuple_modified (modified );
311+ set_modified (modified );
312312 }
313313 }
314314#endif
You can’t perform that action at this time.
0 commit comments