Skip to content

Commit f09fa31

Browse files
committed
For now skip over "new style" weakrefs in clear
1 parent c022930 commit f09fa31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/Runtime.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ internal static BorrowedReference PyObject_GetWeakRefList(BorrowedReference ob)
939939
Debug.Assert(ob != null);
940940
var type = PyObject_TYPE(ob);
941941
int offset = Util.ReadInt32(type, TypeOffset.tp_weaklistoffset);
942-
if (offset == 0) return BorrowedReference.Null;
942+
if (offset <= 0) return BorrowedReference.Null;
943943
Debug.Assert(offset > 0);
944944
return Util.ReadRef(ob, offset);
945945
}

0 commit comments

Comments
 (0)