On 10/14/2018 05:42 PM, Yuya Nishihara wrote: > On Sun, 14 Oct 2018 15:22:07 +0200, Georges Racinet wrote: >> # HG changeset patch >> # User Georges Racinet <graci...@anybox.fr> >> # Date 1539018701 -7200 >> # Mon Oct 08 19:11:41 2018 +0200 >> # Node ID 50d03c9079ffe3932955353be076ff24c4e87804 >> # Parent c04176c0f8b9aeaf196bd1eac00207d526f3d53b >> # EXP-Topic rustancestors-contains >> rust: rustlazyancestors.__contains__ >> +static int rustla_contains(rustlazyancestorsObject *self, PyObject *rev) { >> + if (!(PyInt_Check(rev))) { >> + return 0; >> + } >> + return rustlazyancestors_contains(self->iter, PyInt_AS_LONG(rev)); >> +} > Need tabs ;) yup, sorry, forgot to check that one. > >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >> +++ b/rust/hg-direct-ffi/rustfmt.toml Mon Oct 08 19:11:41 2018 +0200 >> @@ -0,0 +1,3 @@ >> +max_width = 79 >> +wrap_comments = true >> +error_on_line_overflow = true > Can you send a separate patch for this? Yes, it has nothing to do in this one > >> +int rustlazyancestors_contains(rustlazyancestorsObject *self, long rev); >> +#[no_mangle] >> +pub extern "C" fn rustlazyancestors_contains( >> + raw: *mut AncestorsIterator<Index>, >> + target: c_long, >> +) -> c_long { >> + raw_contains(raw, target) >> +} > s/-> c_long/-> c_int/
Should be done in V5. Good catch, again -- Georges Racinet Anybox SAS, http://anybox.fr Téléphone: +33 6 51 32 07 27 GPG: B59E 22AB B842 CAED 77F7 7A7F C34F A519 33AB 0A35, sur serveurs publics _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel