diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/qapi/qmp/json-parser.h | 3 | ||||
-rw-r--r-- | include/qapi/qmp/json-streamer.h | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/include/qapi/qmp/json-parser.h b/include/qapi/qmp/json-parser.h index 102f5c0068..a34209db7a 100644 --- a/include/qapi/qmp/json-parser.h +++ b/include/qapi/qmp/json-parser.h @@ -16,7 +16,6 @@ #include "qemu-common.h" -QObject *json_parser_parse(GQueue *tokens, va_list *ap); -QObject *json_parser_parse_err(GQueue *tokens, va_list *ap, Error **errp); +QObject *json_parser_parse(GQueue *tokens, va_list *ap, Error **errp); #endif diff --git a/include/qapi/qmp/json-streamer.h b/include/qapi/qmp/json-streamer.h index 7922e185a5..e162fd01da 100644 --- a/include/qapi/qmp/json-streamer.h +++ b/include/qapi/qmp/json-streamer.h @@ -25,7 +25,9 @@ typedef struct JSONToken { typedef struct JSONMessageParser { - void (*emit)(struct JSONMessageParser *parser, GQueue *tokens); + void (*emit)(void *opaque, QObject *json, Error *err); + void *opaque; + va_list *ap; JSONLexer lexer; int brace_count; int bracket_count; @@ -37,7 +39,9 @@ void json_message_process_token(JSONLexer *lexer, GString *input, JSONTokenType type, int x, int y); void json_message_parser_init(JSONMessageParser *parser, - void (*func)(JSONMessageParser *, GQueue *)); + void (*emit)(void *opaque, QObject *json, + Error *err), + void *opaque, va_list *ap); void json_message_parser_feed(JSONMessageParser *parser, const char *buffer, size_t size); |