From: Han-Wen Nienhuys Date: Sat, 10 Oct 2020 17:32:07 GMT Subject: Re: [PATCH v2 05/13] reftable: utility functions Message-ID: In-Reply-To: <20201002041214.GE3252492@google.com> On Fri, Oct 2, 2020 at 6:12 AM Jonathan Nieder wrote: > [...] > > +int binsearch(size_t sz, int (*f)(size_t k, void *args), void *args) > > How does this compare to stdlib's bsearch? bsearch gives you back NULL if it doesn't find an exact match. > > + reftable_free(a); > > +} > > Are there other callers that need custom free? The libgit2 folks requested the ability to set memory allocation routines, hence reftable_free(). -- Han-Wen Nienhuys - Google Munich I work 80%. Don't expect answers from me on Fridays. -- Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Paul Manicle, Halimah DeLaine Prado