summaryrefslogtreecommitdiffstats
path: root/src/glsl/pp/sl_pp_token.c
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2009-12-20 13:50:16 +0100
committerMichal Krol <[email protected]>2009-12-20 21:18:59 +0100
commitd696cb279d80ccddebcb28ef6b6284bc6bb9430f (patch)
treec2607d192b151b474f80a154c8c9c846507df604 /src/glsl/pp/sl_pp_token.c
parent7631dca25bd390901036b48709e243db961d3a1f (diff)
glsl/pp: Do processing inline with tokenisation.
Diffstat (limited to 'src/glsl/pp/sl_pp_token.c')
-rw-r--r--src/glsl/pp/sl_pp_token.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/glsl/pp/sl_pp_token.c b/src/glsl/pp/sl_pp_token.c
index d1abbd5257c..a7089787005 100644
--- a/src/glsl/pp/sl_pp_token.c
+++ b/src/glsl/pp/sl_pp_token.c
@@ -507,7 +507,7 @@ _tokenise_number(struct sl_pp_context *context,
}
-static int
+int
sl_pp_token_get(struct sl_pp_context *context,
struct sl_pp_token_info *out)
{
@@ -809,20 +809,16 @@ sl_pp_token_get(struct sl_pp_context *context,
int
sl_pp_tokenise(struct sl_pp_context *context,
- const char *input,
- const struct sl_pp_purify_options *options,
struct sl_pp_token_info **output)
{
struct sl_pp_token_info *out = NULL;
unsigned int out_len = 0;
unsigned int out_max = 0;
- sl_pp_purify_state_init(&context->pure, input, options);
-
for (;;) {
struct sl_pp_token_info info;
- if (sl_pp_token_get(context, &info)) {
+ if (sl_pp_token_buffer_get(&context->tokens, &info)) {
free(out);
return -1;
}