On Tue, Oct 06, 2009 at 11:09:46AM -0700, Ian Romanick wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Chia-I Wu wrote: > > On Mon, Oct 05, 2009 at 11:16:17AM -0600, tom fogal wrote: > >> Chia-I Wu <olva...@gmail.com> writes: > >>> +#ifdef USE_X86_ASM > >>> +extern const GLubyte gl_dispatch_functions_start[]; > >>> +#endif > > There is no functional change here. The original code reads > > > > -#ifdef USE_X86_ASM > > - > > -#if defined( GLX_USE_TLS ) > > -extern GLubyte gl_dispatch_functions_start[]; > > -extern GLubyte gl_dispatch_functions_end[]; > > -#else > > -extern const GLubyte gl_dispatch_functions_start[]; > > -#endif > > - > > -#endif /* USE_X86_ASM */ > > > > Since gl_dispatch_functions_end is never used, and > > gl_dispatch_functions_start is never modified, they are simplified. > But gl_dispatch_funcitons_start is declared (in the assembly stub file) > differently in these cases. Now the extern doesn't match the declaration. I will change it to
#if defined(GLX_USE_TLS) && !defined(GLX_X86_READONLY_TEXT) extern GLubyte gl_dispatch_functions_start[]; #else extern const GLubyte gl_dispatch_functions_start[]; #endif But I am curious about the difference. I mean, gl_dispatch_functions_start is no more than a symbol. There is no C declaration associated with it. Isn't it just fine to have glapi_getproc.c treat it as a constant array of bytes, even when it is modifiable? > > I just had a look at _mesa_bsearch. It seems bsearch is not universally > > available? I think the inline version is also slightly faster. > Madness. bsearch has been part of standard C since 1989. We can be > pretty sure that the implementation of bsearch, qsort, and others in the > C library have been thoroughly debugged. I think that peace of mind is > worth more that the small speed-up gained by open coding. Thanks for pointing out. I will update this part. I wanted to switch to bsearch() when Tom pointed out. The #ifdef in _mesa_bsearch() sort of stopped me. -- Regards, olv ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev