mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-25 02:45:34 +00:00
eef0932471
We have three classes of QAPI visitors: input, output, and dealloc. Currently, all implementations of these visitors have one thing in common based on their visitor type: the implementation used for the visit_type_enum() callback. But since we plan to add more such common behavior, in relation to documenting and further refining the semantics, it makes more sense to have the visitor implementations advertise which class they belong to, so the common qapi-visit-core code can use that information in multiple places. A later patch will better document the types of visitors directly in visitor.h. For this patch, knowing the class of a visitor implementation lets us make input_type_enum() and output_type_enum() become static functions, by replacing the callback function Visitor.type_enum() with the simpler enum member Visitor.type. Share a common assertion in qapi-visit-core as part of the refactoring. Move comments in opts-visitor.c to match the refactored layout. Backports commit 983f52d4b3f86fb9dc9f8b142132feb5a8723016 from qemu |
||
---|---|---|
.. | ||
qmp | ||
dealloc-visitor.h | ||
error.h | ||
qmp-input-visitor.h | ||
qmp-output-visitor.h | ||
string-input-visitor.h | ||
visitor-impl.h | ||
visitor.h |