mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-25 16:35:26 +00:00
8728fea067
Dan Berrange reported a case where he needs to work with a QCryptoBlockOptions union type using the OptsVisitor, but only visit one of the branches of that type (the discriminator is not visited directly, but learned externally). When things were boxed, it was easy: just visit the variant directly, which took care of both allocating the variant and visiting its members, then store that pointer in the union type. But now that things are unboxed, we need a way to visit the members without allocation, done by exposing visit_type_FOO_members() to the user. Before the patch, we had quite a bit of code associated with object_members_seen to make sure that a declaration of the helper was in scope before any use of the function. But now that the helper is public and declared in the header, the .c file no longer needs to worry about topological sorting (the helper is always in scope), which leads to some nice cleanups. Backports commit 4d91e9115cc6700113e772b19d1f39bbcf345977 from qemu
55 lines
2.5 KiB
C
55 lines
2.5 KiB
C
/* AUTOMATICALLY GENERATED, DO NOT MODIFY */
|
|
|
|
/*
|
|
* schema-defined QAPI visitor functions
|
|
*
|
|
* Copyright IBM, Corp. 2011
|
|
*
|
|
* Authors:
|
|
* Anthony Liguori <aliguori@us.ibm.com>
|
|
*
|
|
* This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
|
|
* See the COPYING.LIB file in the top-level directory.
|
|
*
|
|
*/
|
|
|
|
#ifndef QAPI_VISIT_H
|
|
#define QAPI_VISIT_H
|
|
|
|
#include "qapi/visitor.h"
|
|
#include "qapi/qmp/qerror.h"
|
|
#include "qapi-types.h"
|
|
|
|
|
|
#ifndef QAPI_VISIT_BUILTIN
|
|
#define QAPI_VISIT_BUILTIN
|
|
|
|
void visit_type_QType(Visitor *v, const char *name, QType *obj, Error **errp);
|
|
void visit_type_anyList(Visitor *v, const char *name, anyList **obj, Error **errp);
|
|
void visit_type_boolList(Visitor *v, const char *name, boolList **obj, Error **errp);
|
|
void visit_type_int16List(Visitor *v, const char *name, int16List **obj, Error **errp);
|
|
void visit_type_int32List(Visitor *v, const char *name, int32List **obj, Error **errp);
|
|
void visit_type_int64List(Visitor *v, const char *name, int64List **obj, Error **errp);
|
|
void visit_type_int8List(Visitor *v, const char *name, int8List **obj, Error **errp);
|
|
void visit_type_intList(Visitor *v, const char *name, intList **obj, Error **errp);
|
|
void visit_type_numberList(Visitor *v, const char *name, numberList **obj, Error **errp);
|
|
void visit_type_sizeList(Visitor *v, const char *name, sizeList **obj, Error **errp);
|
|
void visit_type_strList(Visitor *v, const char *name, strList **obj, Error **errp);
|
|
void visit_type_uint16List(Visitor *v, const char *name, uint16List **obj, Error **errp);
|
|
void visit_type_uint32List(Visitor *v, const char *name, uint32List **obj, Error **errp);
|
|
void visit_type_uint64List(Visitor *v, const char *name, uint64List **obj, Error **errp);
|
|
void visit_type_uint8List(Visitor *v, const char *name, uint8List **obj, Error **errp);
|
|
|
|
#endif /* QAPI_VISIT_BUILTIN */
|
|
|
|
|
|
void visit_type_DummyForceArrays_members(Visitor *v, DummyForceArrays *obj, Error **errp);
|
|
void visit_type_DummyForceArrays(Visitor *v, const char *name, DummyForceArrays **obj, Error **errp);
|
|
void visit_type_QapiErrorClass(Visitor *v, const char *name, QapiErrorClass *obj, Error **errp);
|
|
|
|
void visit_type_X86CPUFeatureWordInfo_members(Visitor *v, X86CPUFeatureWordInfo *obj, Error **errp);
|
|
void visit_type_X86CPUFeatureWordInfo(Visitor *v, const char *name, X86CPUFeatureWordInfo **obj, Error **errp);
|
|
void visit_type_X86CPUFeatureWordInfoList(Visitor *v, const char *name, X86CPUFeatureWordInfoList **obj, Error **errp);
|
|
void visit_type_X86CPURegister32(Visitor *v, const char *name, X86CPURegister32 *obj, Error **errp);
|
|
|
|
#endif
|