From f24322fbf6599b31f07ebc548e390c77b803d67c Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Wed, 17 Jun 2009 13:49:06 +0200 Subject: glsl: Introduce sl_pp_context and maintain a reuseable pool of strings. --- src/glsl/pp/sl_pp_process.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/glsl/pp/sl_pp_process.c') diff --git a/src/glsl/pp/sl_pp_process.c b/src/glsl/pp/sl_pp_process.c index 56b8fab52a..a97c750de4 100644 --- a/src/glsl/pp/sl_pp_process.c +++ b/src/glsl/pp/sl_pp_process.c @@ -26,7 +26,6 @@ **************************************************************************/ #include -#include #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) { -- cgit v1.2.3