Mercurial > public > mercurial-scm > hg
view rust/hg-direct-ffi/src/lib.rs @ 40272:a36c5e23c055
rust: iterator bindings to C code
In this changeset, still made of Rust code only,
we expose the Rust iterator for instantiation and
consumption from C code.
The idea is that both the index and index_get_parents()
will be passed from the C extension, hence avoiding a hard
link dependency to parsers.so, so that the crate can
still be built and tested independently.
On the other hand, parsers.so will use the symbols
defined in this changeset.
author | Georges Racinet <gracinet@anybox.fr> |
---|---|
date | Thu, 27 Sep 2018 16:51:36 +0200 |
parents | |
children | 72b94f946e90 |
line wrap: on
line source
// Copyright 2018 Georges Racinet <gracinet@anybox.fr> // // This software may be used and distributed according to the terms of the // GNU General Public License version 2 or any later version. //! Bindings for CPython extension code //! //! This exposes methods to build and use a `rustlazyancestors` iterator //! from C code, using an index and its parents function that are passed //! from the caller at instantiation. extern crate hg; extern crate libc; mod ancestors; pub use ancestors::{rustlazyancestors_drop, rustlazyancestors_init, rustlazyancestors_next};