Skip to content

Commit 83cb39f

Browse files
Update weakref_ops.py
1 parent 975d91a commit 83cb39f

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

mypyc/primitives/weakref_ops.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,27 @@
1313
error_kind=ERR_MAGIC,
1414
)
1515

16-
new_ref_op = function_op(
16+
new_ref__with_callback_op = function_op(
1717
name="weakref.ReferenceType",
1818
arg_types=[object_rprimitive, object_rprimitive],
1919
return_type=object_rprimitive,
2020
c_function_name="PyWeakref_NewRef",
2121
error_kind=ERR_MAGIC,
2222
)
23+
24+
new_proxy_op = function_op(
25+
name="weakref.ProxyType",
26+
arg_types=[object_rprimitive],
27+
return_type=object_rprimitive,
28+
c_function_name="PyWeakref_NewProxy",
29+
extra_int_constants=[(0, pointer_rprimitive)],
30+
error_kind=ERR_MAGIC,
31+
)
32+
33+
new_proxy_with_callback_op = function_op(
34+
name="weakref.ProxyType",
35+
arg_types=[object_rprimitive, object_rprimitive],
36+
return_type=object_rprimitive,
37+
c_function_name="PyWeakref_NewProxy",
38+
error_kind=ERR_MAGIC,
39+
)

0 commit comments

Comments
 (0)