Repository navigation
Commit 97a77b7
Do not materialize an empty instance dict in BytesIO/StringIO.__getstate__
Check _PyObject_IsInstanceDictEmpty() first, as object.__getstate__() does,
instead of creating an empty dict just to find out that it is empty.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>1 parent 60955ab commit 97a77b7
2 files changed
Lines changed: 14 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
971 | 971 | | |
972 | 972 | | |
973 | 973 | | |
974 | | - | |
975 | | - | |
976 | | - | |
977 | | - | |
978 | | - | |
979 | | - | |
980 | | - | |
| 974 | + | |
| 975 | + | |
981 | 976 | | |
982 | 977 | | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
983 | 983 | | |
984 | 984 | | |
985 | 985 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
930 | | - | |
931 | | - | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
| 930 | + | |
| 931 | + | |
937 | 932 | | |
938 | 933 | | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
939 | 939 | | |
940 | 940 | | |
941 | 941 | | |
| |||
0 commit comments