Skip to content

Commit 292e849

Browse files
Update prepare.py
1 parent fa595d2 commit 292e849

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mypyc/irbuild/prepare.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,9 @@ def prepare_class_def(
280280
if attrs.get("serializable") is True:
281281
# Supports copy.copy and pickle (including subclasses)
282282
ir._serializable = True
283-
if attrs.get("support_weakrefs") is True:
284-
# Supports weakrefs (including subclasses)
285-
ir.support_weakrefs = True
283+
if attrs.get("supports_weakref") is True:
284+
# Has a tp_weakrefoffset slot allowing the creation of weak references (including subclasses)
285+
ir.supports_weakref = True
286286

287287
# Check for subclassing from builtin types
288288
for cls in info.mro:

0 commit comments

Comments
 (0)