diff options
author | Michal Krol <michal@vmware.com> | 2009-09-14 13:07:25 +0200 |
---|---|---|
committer | Michal Krol <michal@vmware.com> | 2009-09-14 13:07:25 +0200 |
commit | a67f32289a6e22daa2665310f4a8f26979f7ed60 (patch) | |
tree | 0959b3e98b5eaab652ce6e7a05112c777305ba80 /src/glsl/pp/sl_pp_context.c | |
parent | 9f273f109875cd9208d4c1c8f5939fb5e507c230 (diff) |
glsl/pp: Add a dictionary to a context.
Diffstat (limited to 'src/glsl/pp/sl_pp_context.c')
-rw-r--r-- | src/glsl/pp/sl_pp_context.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/glsl/pp/sl_pp_context.c b/src/glsl/pp/sl_pp_context.c index 2fca3791a2..88a002c1c7 100644 --- a/src/glsl/pp/sl_pp_context.c +++ b/src/glsl/pp/sl_pp_context.c @@ -29,16 +29,24 @@ #include "sl_pp_context.h" -void +int sl_pp_context_init(struct sl_pp_context *context) { memset(context, 0, sizeof(struct sl_pp_context)); + + if (sl_pp_dict_init(context)) { + sl_pp_context_destroy(context); + return -1; + } + context->macro_tail = &context->macro; context->if_ptr = SL_PP_MAX_IF_NESTING; context->if_value = 1; memset(context->error_msg, 0, sizeof(context->error_msg)); context->line = 1; context->file = 0; + + return 0; } void |