This is an archive of the discontinued Mercurial Phabricator instance.

revlog: using two new functions in C capsule from Rust code

Authored by Alphare on Feb 26 2020, 12:36 PM.



We expose index_length and index_node in the C capsule, so that
the Rust representation of the C index can implement the RevlogIndex

Because our Node is actually a one-field struct, we have
to decorate it for direct FFI exchange with the C char*

It would be a good thing to get a length from the C layer, but doing
so right now would probably interfere with the upcoming changes that
will happen there for the hash length.

Diff Detail

rHG Mercurial
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Alphare created this revision.Feb 26 2020, 12:36 PM
Alphare updated this revision to Diff 20651.Mar 10 2020, 6:51 AM
marmoute updated this revision to Diff 20678.

rebase above latest default up to landed-D8182

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.