diff options
author | Michal Krol <[email protected]> | 2009-06-17 13:49:06 +0200 |
---|---|---|
committer | Michal Krol <[email protected]> | 2009-09-07 10:11:43 +0200 |
commit | f24322fbf6599b31f07ebc548e390c77b803d67c (patch) | |
tree | a550e9dd12bcceb9acc76bc677b645e4f1b21f17 /src/glsl/pp/sl_pp_process.c | |
parent | f24ec185c531d2b2209df01901c90eca57ca711f (diff) |
glsl: Introduce sl_pp_context and maintain a reuseable pool of strings.
Diffstat (limited to 'src/glsl/pp/sl_pp_process.c')
-rw-r--r-- | src/glsl/pp/sl_pp_process.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/glsl/pp/sl_pp_process.c b/src/glsl/pp/sl_pp_process.c index 56b8fab52a0..a97c750de46 100644 --- a/src/glsl/pp/sl_pp_process.c +++ b/src/glsl/pp/sl_pp_process.c @@ -26,7 +26,6 @@ **************************************************************************/ #include <stdlib.h> -#include <string.h> #include "sl_pp_process.h" @@ -38,7 +37,8 @@ enum process_state { }; int -sl_pp_process(const struct sl_pp_token_info *input, +sl_pp_process(struct sl_pp_context *context, + const struct sl_pp_token_info *input, struct sl_pp_token_info **output) { unsigned int i = 0; @@ -132,18 +132,6 @@ sl_pp_process(const struct sl_pp_token_info *input, out_max = new_max; } - if (info.token == SL_PP_IDENTIFIER) { - info.data.identifier = strdup(info.data.identifier); - if (!info.data.identifier) { - return -1; - } - } else if (info.token == SL_PP_NUMBER) { - info.data.number = strdup(info.data.number); - if (!info.data.number) { - return -1; - } - } - out[out_len++] = info; if (info.token == SL_PP_EOF) { |