diff options
author | Michal Krol <[email protected]> | 2009-06-26 12:26:05 +0200 |
---|---|---|
committer | Michal Krol <[email protected]> | 2009-09-07 10:11:52 +0200 |
commit | a294715612d14d64e12026361ff7cc29321607d6 (patch) | |
tree | 34f6fdc5ad039a504b7f99eba340b3668225af32 /src/glsl/pp/sl_pp_process.c | |
parent | 153b179862411e9de14d26bbcff16bc81f1edc91 (diff) |
glsl: Allow for preprocessor macro redefinition.
Diffstat (limited to 'src/glsl/pp/sl_pp_process.c')
-rw-r--r-- | src/glsl/pp/sl_pp_process.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/glsl/pp/sl_pp_process.c b/src/glsl/pp/sl_pp_process.c index 441de9439c5..4715eed2fcd 100644 --- a/src/glsl/pp/sl_pp_process.c +++ b/src/glsl/pp/sl_pp_process.c @@ -71,10 +71,8 @@ sl_pp_process(struct sl_pp_context *context, { unsigned int i = 0; int found_eof = 0; - struct sl_pp_macro **macro; struct sl_pp_process_state state; - macro = &context->macro; memset(&state, 0, sizeof(state)); while (!found_eof) { @@ -126,16 +124,9 @@ sl_pp_process(struct sl_pp_context *context, if (!strcmp(name, "define")) { if (context->if_value) { - *macro = sl_pp_macro_new(); - if (!*macro) { + if (sl_pp_process_define(context, input, first, last)) { return -1; } - - if (sl_pp_process_define(context, input, first, last, *macro)) { - return -1; - } - - macro = &(**macro).next; } } else if (!strcmp(name, "if")) { if (sl_pp_process_if(context, input, first, last)) { |