Skip to content

Commit 0fbc5ab

Browse files
committed
fix: steal maybe
1 parent 926ada9 commit 0fbc5ab

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

mypyc/primitives/weakref_ops.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,22 @@
2020
c_function_name="PyWeakref_NewRef",
2121
error_kind=ERR_MAGIC,
2222
)
23+
24+
new_proxy_op = function_op(
25+
name="_weakref.proxy",
26+
arg_types=[object_rprimitive],
27+
steals=[True],
28+
return_type=object_rprimitive,
29+
c_function_name="PyWeakref_NewProxy",
30+
extra_int_constants=[(0, pointer_rprimitive)],
31+
error_kind=ERR_MAGIC,
32+
)
33+
34+
new_proxy_with_callback_op = function_op(
35+
name="_weakref.proxy",
36+
arg_types=[object_rprimitive, object_rprimitive],
37+
steals=[True, False],
38+
return_type=object_rprimitive,
39+
c_function_name="PyWeakref_NewProxy",
40+
error_kind=ERR_MAGIC,
41+
)

0 commit comments

Comments
 (0)