Skip to content

Commit fd8ca83

Browse files
committed
Add a comment for _Py_hashtable_new_full destroys
1 parent 6d668e6 commit fd8ca83

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Objects/unicodeobject.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,12 @@ init_global_interned_strings(PyInterpreterState *interp)
309309
{
310310
assert(INTERNED_STRINGS == NULL);
311311
_Py_hashtable_allocator_t hashtable_alloc = {PyMem_RawMalloc, PyMem_RawFree};
312+
312313
INTERNED_STRINGS = _Py_hashtable_new_full(
313314
hashtable_unicode_hash,
314315
hashtable_unicode_compare,
316+
// Objects stored here are immortal and statically allocated,
317+
// so we don't need key_destroy_func & value_destroy_func:
315318
NULL,
316319
NULL,
317320
&hashtable_alloc

0 commit comments

Comments
 (0)