Re: [Mesa-dev] [PATCH] glvnd: Fix dynamic GLX entrypoint lookup

2016-09-14 Thread Adam Jackson
On Mon, 2016-09-05 at 11:23 +0100, Eric Engestrom wrote: > > +static int > > +compare(const void *l, const void *r) > > +{ > > +const char *s = *(const char **)r; > > Shouldn't we do the same with `l`? No. 'l' is the key we're looking for (the function name), r is the current element of the a

Re: [Mesa-dev] [PATCH] glvnd: Fix dynamic GLX entrypoint lookup

2016-09-05 Thread Emil Velikov
On 5 September 2016 at 11:23, Eric Engestrom wrote: > On Fri, Sep 02, 2016 at 04:12:24PM -0400, Adam Jackson wrote: >> The dynamic dispatch table needs to be sorted properly, the entrypoints >> shouldn't duplicate the 'glX' prefix, and please just use bsearch() >> instead of open-coding it. >> >>

Re: [Mesa-dev] [PATCH] glvnd: Fix dynamic GLX entrypoint lookup

2016-09-05 Thread Eric Engestrom
On Fri, Sep 02, 2016 at 04:12:24PM -0400, Adam Jackson wrote: > The dynamic dispatch table needs to be sorted properly, the entrypoints > shouldn't duplicate the 'glX' prefix, and please just use bsearch() > instead of open-coding it. > > Signed-off-by: Adam Jackson > --- > src/glx/g_glxglvnddis

[Mesa-dev] [PATCH] glvnd: Fix dynamic GLX entrypoint lookup

2016-09-02 Thread Adam Jackson
The dynamic dispatch table needs to be sorted properly, the entrypoints shouldn't duplicate the 'glX' prefix, and please just use bsearch() instead of open-coding it. Signed-off-by: Adam Jackson --- src/glx/g_glxglvnddispatchfuncs.c | 254 ++-- src/glx/g_glxglvn