mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 20:03:54 -06:00
json: Make JSONToken opaque outside json-parser.c
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180823164025.12553-52-armbru@redhat.com>
This commit is contained in:
parent
a2731e08ee
commit
abe7c2067c
4 changed files with 24 additions and 14 deletions
|
@ -82,13 +82,7 @@ void json_message_process_token(JSONLexer *lexer, GString *input,
|
|||
goto out_emit;
|
||||
}
|
||||
|
||||
token = g_malloc(sizeof(JSONToken) + input->len + 1);
|
||||
token->type = type;
|
||||
memcpy(token->str, input->str, input->len);
|
||||
token->str[input->len] = 0;
|
||||
token->x = x;
|
||||
token->y = y;
|
||||
|
||||
token = json_token(type, x, y, input);
|
||||
parser->token_size += input->len;
|
||||
|
||||
g_queue_push_tail(&parser->tokens, token);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue