Chia-I Wu wrote:
> On Thu, Jul 16, 2009 at 08:19:38AM -0600, Brian Paul wrote:

>>> diff --git a/src/egl/main/eglcurrent.h b/src/egl/main/eglcurrent.h
>>> index 14d2923..5aa6a78 100644
>>> --- a/src/egl/main/eglcurrent.h
>>> +++ b/src/egl/main/eglcurrent.h
>>> @@ -5,14 +5,24 @@
>>> #include "eglhash.h"
>>> +#define _EGL_API_VALID(api) \
>>> +   (((api) >= EGL_OPENGL_ES_API && (api) <= EGL_OPENGL_API) || (api) == 
>>> EGL_NONE)
>>> +#define _EGL_API_NUM_INDICES \
>>> +   (EGL_OPENGL_API - EGL_OPENGL_ES_API + 2) /* idx 0 is for EGL_NONE */
>>> +
>>> +#define _EGL_API_TO_INDEX(api) \
>>> +   ((api) != EGL_NONE ? (api) - EGL_OPENGL_ES_API + 1 : 0)
>>> +#define _EGL_API_FROM_INDEX(idx) \
>>> +   ((idx) != 0 ? EGL_OPENGL_ES_API + (idx) - 1 : EGL_NONE)
>> These macros should all be inline functions instead.  For example:
>>
>> static INLINE EGLBoolean
>> _eglIsApiValid(EGLint api)
>> {
>>    return (((api) >= EGL_OPENGL_ES_API && (api) <= EGL_OPENGL_API)
>> || (api) == EGL_NONE);
>> }
> Will static inline them.  Does it sound fine if I define INLINE in
> egltypedefs.h?

Or maybe create an eglcompiler.h file for that kind of thing.  See 
src/mesa/main/compiler.h for example.

-Brian


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to