Re: [Mesa-dev] [PATCH] glcpp: Check version_resolved in the proper place.

2014-01-26 Thread Matt Turner
On Sat, Jan 25, 2014 at 12:57 PM, Carl Worth wrote: > Matt Turner writes: >> The check was in the wrong place, ... > > I don't doubt that the change here is good and correct, but I think > there's likely some additional renaming that can be applied: > >> + if (parser->version_resolved) >> +

Re: [Mesa-dev] [PATCH] glcpp: Check version_resolved in the proper place.

2014-01-25 Thread Carl Worth
Matt Turner writes: > The check was in the wrong place, ... I don't doubt that the change here is good and correct, but I think there's likely some additional renaming that can be applied: > + if (parser->version_resolved) > + return; > + > parser->version_resolved = true;

[Mesa-dev] [PATCH] glcpp: Check version_resolved in the proper place.

2014-01-25 Thread Matt Turner
The check was in the wrong place, such that if a shader incorrectly put a preprocessor token before the #version declaration, the version would be resolved twice, leading to a segmentation fault when attempting to redefine the __VERSION__ macro. #define GL_ARB_sample_shading #version 130 void m