--- a/rust/hg-direct-ffi/src/ancestors.rs Fri Nov 02 21:25:35 2018 +0900
+++ b/rust/hg-direct-ffi/src/ancestors.rs Sun Oct 28 21:16:36 2018 +0900
@@ -60,15 +60,16 @@
pub extern "C" fn rustlazyancestors_init(
index: IndexPtr,
parents: IndexParentsFn,
- initrevslen: usize,
+ initrevslen: ssize_t,
initrevs: *mut c_long,
stoprev: c_long,
inclusive: c_int,
) -> *mut AncestorsIterator<Index> {
+ assert!(initrevslen >= 0);
unsafe {
raw_init(
Index::new(index, parents),
- initrevslen,
+ initrevslen as usize,
initrevs,
stoprev,
inclusive,