mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
qapi: introduce forwarding visitor
This new adaptor visitor takes a single field of the adaptee, and exposes it with a different name. This will be used for QOM alias properties. Alias targets can of course have a different name than the alias property itself (e.g. a machine's pflash0 might be an alias of a property named 'drive'). When the target's getter or setter invokes the visitor, it will use a different name than what the caller expects, and the visitor will not be able to find it (or will consume erroneously). The solution is for alias getters and setters to wrap the incoming visitor, and forward the sole field that the target is expecting while renaming it appropriately. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
eafadbbbac
commit
18fa3ebc45
5 changed files with 552 additions and 0 deletions
|
@ -2,6 +2,7 @@ util_ss.add(files(
|
|||
'opts-visitor.c',
|
||||
'qapi-clone-visitor.c',
|
||||
'qapi-dealloc-visitor.c',
|
||||
'qapi-forward-visitor.c',
|
||||
'qapi-util.c',
|
||||
'qapi-visit-core.c',
|
||||
'qobject-input-visitor.c',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue