D5441: rust-cpython: binding for LazyAncestors

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Sun Dec 23 23:57:38 EST 2018


yuja added a comment.


  > +/// The purpose of this module is to hide identifiers from other Rust users
  >  +///
  >  +/// Some of the identifiers we are defining are meant for consumption
  >  +/// from Python with other naming conventions. For instance, `py_class!`
  >  +/// does not let us make a distinction between the Python and the Rust name,
  >  +/// and that name ends up in particular in the `__class__` attribute, so that
  >  +/// renaming it inside its Python module is not enough.
  >  +///
  >  +/// For Rust consumers, we will reexport these definitions, following the
  >  +/// appropriate naming convention.
  >  +mod concealed_detail {
  >  +    use super::*;
  >  +
  >  +    py_class!(pub class lazyancestors |py| {
  
  Does the class name actually matter? Personally I don't care if
  `lazyancestors()` function returns a `LazyAncestors` object. We'll anyway
  need a wrapper function to make pure ancestors and rustext ancestors
  compatible.

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list