[Mesa-dev] [PATCH] glsl/glcpp: rename ERROR to ERROR_TOKEN to fix MSVC build
Kenneth Graunke
kenneth at whitecape.org
Wed Jul 30 10:36:04 PDT 2014
On Wednesday, July 30, 2014 11:31:19 AM Jose Fonseca wrote:
> On 30/07/14 03:42, Kenneth Graunke wrote:
> > On Tuesday, July 29, 2014 05:02:39 PM Brian Paul wrote:
> >> ERROR is a #define in the MSVC WinGDI.h header file.
> >> Add the _TOKEN suffix as we do for a few other lexer tokens.
>
> Brian, sorry I missed your review and ended up duplicating it byte per
> byte! Obviously it looks fine to me.
>
> >
> > How about ERROR_TOK? That's what we use in the main compiler.
>
> Kenneth, I also think it is worth to have some unique prefix/suffix on
> all tokens, to prevent this sort of collisions and make the code more
> consistent. But I believe that if/what prefix/suffix to use is
> something that glsl maintainers need to discuss and figure out among
> themselves. In the meanwhile, we just need to fix the build somehow.
> And _TOKEN is at least consistent with some of other existing tokens FWIW.
>
> Jose
Sure, I'm fine with putting either _TOKEN or _TOK on all of the tokens - it seems like a good idea.
Obviously fixing the build is a priority, which is why I reviewed Brian's patch as soon as I saw it. The _TOK comment was a take-it-or-leave-it suggestion.
--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140730/f08d09ee/attachment.sig>
More information about the mesa-dev
mailing list