[vlc-commits] json: pass opaque data to tokeniser
Rémi Denis-Courmont
git at videolan.org
Wed Sep 30 20:53:09 CEST 2020
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Sep 30 21:18:21 2020 +0300| [249ee77f30f34bef3d5b5be517f6665ce05f5a24] | committer: Rémi Denis-Courmont
json: pass opaque data to tokeniser
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=249ee77f30f34bef3d5b5be517f6665ce05f5a24
---
modules/demux/json/grammar.y | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/demux/json/grammar.y b/modules/demux/json/grammar.y
index e298c67fde..d6b3b31c0d 100644
--- a/modules/demux/json/grammar.y
+++ b/modules/demux/json/grammar.y
@@ -153,7 +153,7 @@ static void yyerror(void *log, void *scanner, struct json_object *result,
(void) scanner; (void) result;
}
-extern int yylex_init(void **);
+extern int yylex_init_extra(void *, void **);
extern void yyset_in(FILE *, void *);
extern int yylex(YYSTYPE *value, void *scanner);
extern int yylex_destroy(void *);
@@ -214,16 +214,16 @@ value:
%%
-int json_parse(void *log, FILE *in, struct json_object *result)
+int json_parse(void *opaque, FILE *in, struct json_object *result)
{
void *scanner;
- int ret = yylex_init(&scanner);
+ int ret = yylex_init_extra(opaque, &scanner);
if (ret)
return ret;
yyset_in(in, scanner);
- ret = yyparse(log, scanner, result);
+ ret = yyparse(opaque, scanner, result);
yylex_destroy(scanner);
return ret;
}
More information about the vlc-commits
mailing list