Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Ref is always NULL if callback is NULL
  • Loading branch information
mpage committed Mar 14, 2024
commit 56956ecf51479c47b358b2d51b00b32a5582642c
4 changes: 2 additions & 2 deletions Objects/weakrefobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,8 +807,8 @@ PyWeakref_NewRef(PyObject *ob, PyObject *callback)
result = new_weakref(ob, callback);
if (result != NULL) {
if (callback == NULL) {
if (ref == NULL)
insert_head(result, list);
assert(ref == NULL);
insert_head(result, list);
}
else {
PyWeakReference *prev;
Expand Down