This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Ping: [PATCH] Add inline bsearch expansion
- From: Roland McGrath <roland at hack dot frob dot com>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: Andreas Jaeger <aj at suse dot com>, libc-alpha at sourceware dot org
- Date: Thu, 7 Feb 2013 12:56:20 -0800 (PST)
- Subject: Re: Ping: [PATCH] Add inline bsearch expansion
- References: <20130105125130.GA2893@domone.kolej.mff.cuni.cz><20130105131937.GD26036@sunsite.ms.mff.cuni.cz><20130105152625.GA18344@domone.kolej.mff.cuni.cz><50E9D046.3030108@suse.com><20130106205715.GA3227@domone.kolej.mff.cuni.cz><20130201093632.GA7616@domone.kolej.mff.cuni.cz>
Don't even bother asking for approval if you aren't including a proper
ChangeLog entry.
Use __compar_fn_t in the declaration like the existing header declaration
does.
We should avoid duplicating the code (even though clearly this code is
never going to change). One way to do that would be to put the definition
into a new file bits/stdlib-bsearch.h that stdlib.h includes under
__USE_EXTERN_INLINES. Then stdlib/bsearch.c can do:
#include <stdlib.h>
#undef __extern_inline
#define __extern_inline /* Empty, so we get a normal definition. */
#include <bits/stdlib-bsearch.h>
Thanks,
Roland