equal
deleted
inserted
replaced
58 /// we receive the index and the parents function as pointers |
58 /// we receive the index and the parents function as pointers |
59 #[no_mangle] |
59 #[no_mangle] |
60 pub extern "C" fn rustlazyancestors_init( |
60 pub extern "C" fn rustlazyancestors_init( |
61 index: IndexPtr, |
61 index: IndexPtr, |
62 parents: IndexParentsFn, |
62 parents: IndexParentsFn, |
63 initrevslen: usize, |
63 initrevslen: ssize_t, |
64 initrevs: *mut c_long, |
64 initrevs: *mut c_long, |
65 stoprev: c_long, |
65 stoprev: c_long, |
66 inclusive: c_int, |
66 inclusive: c_int, |
67 ) -> *mut AncestorsIterator<Index> { |
67 ) -> *mut AncestorsIterator<Index> { |
|
68 assert!(initrevslen >= 0); |
68 unsafe { |
69 unsafe { |
69 raw_init( |
70 raw_init( |
70 Index::new(index, parents), |
71 Index::new(index, parents), |
71 initrevslen, |
72 initrevslen as usize, |
72 initrevs, |
73 initrevs, |
73 stoprev, |
74 stoprev, |
74 inclusive, |
75 inclusive, |
75 ) |
76 ) |
76 } |
77 } |