Use yy_scan_string and stop caring about shader->SourceLen.
We had to call strlen on the preprocessed source, which seemed a bit
pointless; also, we updated shader->SourceLen but not shader->Source,
which was even more confusing. Just leave both untouched.
diff --git a/glsl_parser_extras.h b/glsl_parser_extras.h
index cad3424..1edd86b 100644
--- a/glsl_parser_extras.h
+++ b/glsl_parser_extras.h
@@ -102,11 +102,11 @@
const char *fmt, ...);
extern "C" {
-extern int preprocess(void *ctx, const char **shader, size_t *shader_len);
+extern int preprocess(void *ctx, const char **shader);
}
extern void _mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state,
- const char *string, size_t len);
+ const char *string);
extern void _mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state *state);