On Thu 23 Apr 2015, Emil Velikov wrote: > On 22 April 2015 at 20:26, Chad Versace wrote: > > On Fri 10 Apr 2015, Emil Velikov wrote: > >> On 09/04/15 22:48, Chad Versace wrote: > >> > On Mon 30 Mar 2015, Frank Henigman wrote: > > >> >> diff --git a/include/waffle/waffle.h b/include/waffle/waffle.h > >> >> index 297a487..df0218e 100644 > >> >> --- a/include/waffle/waffle.h > >> >> +++ b/include/waffle/waffle.h > >> >> @@ -172,6 +172,7 @@ enum waffle_enum { > >> >> > >> >> WAFFLE_WINDOW_WIDTH = > >> >> 0x0310, > >> >> WAFFLE_WINDOW_HEIGHT = > >> >> 0x0311, > >> >> + WAFFLE_WINDOW_FULLSCREEN = > >> >> 0x0312, > >> > > >> > wcore_enum_to_string must be taught about the new enum. > >> > > >> Hi Chad, > >> > >> Should one wrap the new enum in #if WAFFLE_API_VERSION >= 0x1070 ? Or it > >> only makes sense for new entry points into the waffle library ? > >> Considering that WAFFLE_WINDOW_{WIDTH,HEIGHT} went in without the API > >> guard, I'm leaning towards the latter. > > > > I'm unsure. Other libraries that use feature test macros, what do they > > do? For the record, when adding WAFFLE_CONTEXT_FORWARD_COMPATIBLE and > > WAFFLE_CONTEXT_DEBUG, I guarded those with 0x0130. But I'm open to > > guarding only entry points if that makes more sense. > > > That's the key that brought us here in the first place ;-) From a > quick look at my /usr/include all of the feature test macros are used > to guard structs (be that new ones or ABI changes) and functions > prototypes. Haven't seen one guarding enums/defines. > > > I think we should research what other libraries do before committing to > > a decision. > > > Personally I would opt for dropping the guards in enums > - GDK, xfixes, jpeglib guards only structs/functions, > - anyone can provide a dummy/invalid value, it's up-to the API to > disregard/ignore it :-)
Ok, then that's the policy going forward. Guard structs and functions, but not enums. Thanks for doing the research, Emil. _______________________________________________ waffle mailing list waffle@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/waffle