|
3 | 3 |
|
4 | 4 | # Weakref operations
|
5 | 5 |
|
6 |
| -py_weakref_new_ref_op = function_op( |
| 6 | +""" |
| 7 | +py_new_weak_ref_op = function_op( |
7 | 8 | name="weakref.weakref",
|
8 | 9 | arg_types=[object_rprimitive],
|
| 10 | + # TODO: how do I pass NULL as the 2nd arg? |
| 11 | + #extra_int_constants=[], |
9 | 12 | result_type=object_rprimitive,
|
10 | 13 | c_function_name="PyWeakref_NewRef",
|
11 | 14 | )
|
| 15 | +""" |
12 | 16 |
|
13 |
| -py_weakref_new_ref_op = function_op( |
| 17 | +py_new_weak_ref_with_callback_op = function_op( |
| 18 | + name="weakref.weakref", |
| 19 | + arg_types=[object_rprimitive, object_rprimitive], |
| 20 | + result_type=object_rprimitive, |
| 21 | + c_function_name="PyWeakref_NewRef", |
| 22 | +) |
| 23 | + |
| 24 | +""" |
| 25 | +py_new_weak_proxy_op = function_op( |
14 | 26 | name="weakref.proxy",
|
15 | 27 | arg_types=[object_rprimitive],
|
16 | 28 | result_type=object_rprimitive,
|
17 | 29 | c_function_name="PyWeakref_NewProxy",
|
18 | 30 | )
|
| 31 | +""" |
| 32 | + |
| 33 | +py_new_weak_proxy_with_callback_op = function_op( |
| 34 | + name="weakref.proxy", |
| 35 | + arg_types=[object_rprimitive, object_rprimitive], |
| 36 | + result_type=object_rprimitive, |
| 37 | + c_function_name="PyWeakref_NewProxy", |
| 38 | +) |
0 commit comments