rust-cpython: move $leaked struct out of macro
It wasn't easy to hack the $leaked struct since errors in macro would generate lots of compile errors. Let's make it a plain struct so we can easily extend it. PyLeakedRef keeps a more generic PyObject instead of the $name struct since it no longer has to call any specific methods implemented by the $name class. $leaked parameter in py_shared_iterator!() is kept for future change.
Showing
- rust/hg-cpython/src/dirstate/copymap.rs 4 additions, 3 deletionsrust/hg-cpython/src/dirstate/copymap.rs
- rust/hg-cpython/src/dirstate/dirs_multiset.rs 4 additions, 3 deletionsrust/hg-cpython/src/dirstate/dirs_multiset.rs
- rust/hg-cpython/src/dirstate/dirstate_map.rs 4 additions, 4 deletionsrust/hg-cpython/src/dirstate/dirstate_map.rs
- rust/hg-cpython/src/ref_sharing.rs 45 additions, 49 deletionsrust/hg-cpython/src/ref_sharing.rs
Loading
Please register or sign in to comment