summaryrefslogtreecommitdiffstats
path: root/src/glsl/apps/version.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/apps/version.c')
-rw-r--r--src/glsl/apps/version.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/glsl/apps/version.c b/src/glsl/apps/version.c
index b49395ba97f..c56ae9dde9a 100644
--- a/src/glsl/apps/version.c
+++ b/src/glsl/apps/version.c
@@ -41,6 +41,7 @@ main(int argc,
char *inbuf;
struct sl_pp_purify_options options;
char *outbuf;
+ struct sl_pp_context context;
struct sl_pp_token_info *tokens;
unsigned int version;
unsigned int tokens_eaten;
@@ -83,18 +84,23 @@ main(int argc,
free(inbuf);
- if (sl_pp_tokenise(outbuf, &tokens)) {
+ sl_pp_context_init(&context);
+
+ if (sl_pp_tokenise(&context, outbuf, &tokens)) {
+ sl_pp_context_destroy(&context);
free(outbuf);
return 1;
}
free(outbuf);
- if (sl_pp_version(tokens, &version, &tokens_eaten)) {
+ if (sl_pp_version(&context, tokens, &version, &tokens_eaten)) {
+ sl_pp_context_destroy(&context);
free(tokens);
return -1;
}
+ sl_pp_context_destroy(&context);
free(tokens);
out = fopen(argv[2], "wb");