Skip to content

Commit b5b2786

Browse files
post code review edits
1 parent 026917f commit b5b2786

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Objects/codeobject.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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. */
203202
static int
204203
intern_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

0 commit comments

Comments
 (0)