D7543: revlog: made C Capsule an array of function pointers

2020-01-04 Thread yuja (Yuya Nishihara)
yuja added a comment. > A possibility, since we're now on this data + functions capsule would be to introduce an ABI version number in the capsule. > At least, that's the first thing that comes to mind. Yeah, parsers.c:version could be embedded, for example. > If that check

Re: D7543: revlog: made C Capsule an array of function pointers

2020-01-04 Thread Yuya Nishihara
> A possibility, since we're now on this data + functions capsule would be to > introduce an ABI version number in the capsule. > At least, that's the first thing that comes to mind. Yeah, parsers.c:version could be embedded, for example. > If that check were in `Index::new()`, I'm

D7543: revlog: made C Capsule an array of function pointers

2020-01-04 Thread gracinet (Georges Racinet)
gracinet added a comment. @yuja for now I'm indeed implicitely assuming both were built from the same source tree, but I understand your concern. A possibility, since we're now on this data + functions capsule would be to introduce an ABI version number in the capsule. At least, that's

D7543: revlog: made C Capsule an array of function pointers

2020-01-04 Thread yuja (Yuya Nishihara)
yuja added a comment. > +typedef struct { > + int (*index_parents)(PyObject *, int, int *); > +} Revlog_CAPI; Do we have any plan to detect C-Rust ABI mismatch? Renaming the symbol? REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7543/new/

Re: D7543: revlog: made C Capsule an array of function pointers

2020-01-04 Thread Yuya Nishihara
> +typedef struct { > + int (*index_parents)(PyObject *, int, int *); > +} Revlog_CAPI; Do we have any plan to detect C-Rust ABI mismatch? Renaming the symbol? ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org

D7543: revlog: made C Capsule an array of function pointers

2019-12-23 Thread gracinet (Georges Racinet)
Closed by commit rHGf384d68d8ea8: revlog: made C Capsule an array of function pointers (authored by gracinet). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7543?vs=18424=18918

D7543: revlog: made C Capsule an array of function pointers

2019-12-23 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. I was going to say this requires a bump of the module version. But for some reason, we don't track an explicit version of this C extension. Weird. REPOSITORY rHG Mercurial BRANCH

D7543: revlog: made C Capsule an array of function pointers

2019-12-02 Thread gracinet (Georges Racinet)
gracinet created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Although it's perfectly valid to put a function pointer in a capsule, as we've been doing since the start of rust/hg-cpython, an array of