This is an archive of the discontinued Mercurial Phabricator instance.

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

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

Details

Summary

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

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

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

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.