Repository navigation
Commit 1e406e6
Use the dict freelist in dict()
dict_vectorcall() allocated every instance with _PyType_AllocNoTrack(),
so dict() never reused the objects that {} and PyDict_New() recycle
through the freelist. Allocate with PyDict_New() instead. tp_vectorcall
is not inherited by subclasses, so dict_vectorcall() only ever runs for
the exact dict type; assert that rather than checking it.
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
1 parent af79f49 commit 1e406e6
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5415 | 5415 | | |
5416 | 5416 | | |
5417 | 5417 | | |
5418 | | - | |
| 5418 | + | |
| 5419 | + | |
5419 | 5420 | | |
5420 | 5421 | | |
5421 | 5422 | | |
| |||
0 commit comments