Skip to content

Commit 6420cce

Browse files
committed
Update prepare.py
1 parent 35584b7 commit 6420cce

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
@@ -326,9 +326,9 @@ def prepare_class_def(
326326
if attrs.get("serializable") is True:
327327
# Supports copy.copy and pickle (including subclasses)
328328
ir._serializable = True
329-
if attrs.get("support_weakrefs") is True:
330-
# Supports weakrefs (including subclasses)
331-
ir.support_weakrefs = True
329+
if attrs.get("supports_weakref") is True:
330+
# Has a tp_weakrefoffset slot allowing the creation of weak references (including subclasses)
331+
ir.supports_weakref = True
332332

333333
# Check for subclassing from builtin types
334334
for cls in info.mro:

0 commit comments

Comments
 (0)