Skip to content

Commit bc96da2

Browse files
Update emitclass.py
1 parent f43eaae commit bc96da2

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
@@ -293,7 +293,8 @@ def emit_line() -> None:
293293
"};",
294294
)
295295
if emitter.capi_version < (3, 12):
296-
# versions >= 3.12 do not define tp_weaklistoffset, but set Py_TPFLAGS_MANAGED_WEAKREF flag instead
296+
# versions >= 3.12 set Py_TPFLAGS_MANAGED_WEAKREF flag instead
297+
# https://docs.python.org/3.12/extending/newtypes.html#weak-reference-support
297298
fields["tp_weaklistoffset"] = base_size
298299
else:
299300
fields["tp_basicsize"] = base_size

0 commit comments

Comments
 (0)