D6631: rust-cpython: add macro for sharing references

kevincox (Kevin Cox) phabricator at mercurial-scm.org
Mon Aug 12 16:11:34 UTC 2019


kevincox added a comment.
kevincox accepted this revision.


  In D6631#97887 <https://phab.mercurial-scm.org/D6631#97887>, @Alphare wrote:
  
  > @kevincox I've renamed the file since it no longer just contains macros.
  > I've moved whatever I could move to separate structs and used `Cell` instead of `RefCell` on those scalar types. I'm not so keen on using `UnsafeCell`, espacially since the target `py_class!`-resulting struct could be using `RefCell`-specific APIs.
  
  Ack. it still feels like we are kinda implementing a second `RefCell` anyways but I think this code is quite clean.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6631/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6631

To: Alphare, #hg-reviewers, kevincox
Cc: gracinet, durin42, kevincox, mercurial-devel


More information about the Mercurial-devel mailing list