]> git.proxmox.com Git - mirror_qemu.git/commit - qapi/qobject-input-visitor.c
qapi: change QmpInputVisitor to QSLIST
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 7 Jul 2016 15:53:18 +0000 (17:53 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 19 Jul 2016 11:21:08 +0000 (13:21 +0200)
commit3d344c2aabb7bc9b414321e3c52872901edebdda
treee5e965e224c1d056a2c40f3237ce505c3f3878b1
parentfc76ae8b38783e82c109834573ba5d6f080440b5
qapi: change QmpInputVisitor to QSLIST

This saves a lot of memory compared to a statically-sized array,
or at least 24kb could be considered a lot on an Atari ST.
It also makes the code more similar to QmpOutputVisitor.

This removes the limit on the depth of a QObject that can be processed
into a QAPI tree.  This is not a problem because QObjects can be
considered trusted; the text received on the QMP wire is untrusted
input, but the JSON parser already takes pains to limit the QObject tree
it creates.  We don't need the QMP input visitor to limit it again.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <1467906798-5312-3-git-send-email-pbonzini@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[Commit message typo fixed]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
qapi/qmp-input-visitor.c