summaryrefslogtreecommitdiff
path: root/glcpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-06-21 11:43:42 -0700
committerKenneth Graunke <kenneth@whitecape.org>2010-06-21 12:41:05 -0700
commit4a2bbdacfc29460de09e5f806fcc96040ad17dc4 (patch)
tree9cdada229c0a4770457703740010a251a4d4ae76 /glcpp
parent26e761edb26322eab497e884fcf7ae35fb3fd3e5 (diff)
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.
Diffstat (limited to 'glcpp')
-rw-r--r--glcpp/pp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/glcpp/pp.c b/glcpp/pp.c
index eaca481..e6921db 100644
--- a/glcpp/pp.c
+++ b/glcpp/pp.c
@@ -57,7 +57,7 @@ glcpp_warning (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...)
}
extern int
-preprocess(void *talloc_ctx, const char **shader, size_t *shader_len)
+preprocess(void *talloc_ctx, const char **shader)
{
int errors;
glcpp_parser_t *parser = glcpp_parser_create ();
@@ -69,7 +69,6 @@ preprocess(void *talloc_ctx, const char **shader, size_t *shader_len)
talloc_steal(talloc_ctx, parser->output);
*shader = parser->output;
- *shader_len = strlen(parser->output);
errors = parser->error;
glcpp_parser_destroy (parser);