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
> 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
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
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/
> +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
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
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
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