Skip to content

Commit 36597c7

Browse files
committed
Update emitclass.py
1 parent 82a69a5 commit 36597c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mypyc/codegen/emitclass.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ def emit_line() -> None:
323323
"};",
324324
)
325325
if emitter.capi_version < (3, 12):
326-
# versions >= 3.12 do not define tp_weaklistoffset, but set Py_TPFLAGS_MANAGED_WEAKREF flag instead
326+
# versions >= 3.12 set Py_TPFLAGS_MANAGED_WEAKREF flag instead
327+
# https://docs.python.org/3.12/extending/newtypes.html#weak-reference-support
327328
fields["tp_weaklistoffset"] = base_size
328329
else:
329330
fields["tp_basicsize"] = base_size

0 commit comments

Comments
 (0)