D6631: rust-cpython: add macro for sharing references

Alphare (Raphaël Gomès) phabricator at mercurial-scm.org
Wed Jul 24 11:33:50 EDT 2019


Alphare added a comment.


  @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.
  
  I'm not too sure on the terminology, so tell me if you have better ideas than mine.
  
  Later down the line, I could see a `trait` to help define the interface for shared structs.

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
Cc: gracinet, durin42, kevincox, mercurial-devel


More information about the Mercurial-devel mailing list