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

Yuya Nishihara yuya at tcha.org
Sat Jan 4 08:02:30 EST 2020


>   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 confident it wouldn't have any performance impact.
>   What kind of error feedback could we be sending, then ?

I think any Python-level exception should be fine. My only concern is somehow
incompatible C+Rust extensions happen to work (e.g. memory layout was similar),
but causes data loss. Import-time error might be better if that can be easily
implemented.


More information about the Mercurial-devel mailing list