Visitar URL original
Python 3.12 by filmor · Pull Request #2249 · pythonnet/pythonnet · GitHub
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
Next Next commit
For now skip over "new style" weakrefs in clear
  • Loading branch information
filmor committed Oct 4, 2023
commit 080d1bd59f2b231db2081474cf126e46aa039505
2 changes: 1 addition & 1 deletion src/runtime/Runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ internal static BorrowedReference PyObject_GetWeakRefList(BorrowedReference ob)
Debug.Assert(ob != null);
var type = PyObject_TYPE(ob);
int offset = Util.ReadInt32(type, TypeOffset.tp_weaklistoffset);
if (offset == 0) return BorrowedReference.Null;
if (offset <= 0) return BorrowedReference.Null;
Debug.Assert(offset > 0);
return Util.ReadRef(ob, offset);
}
Expand Down