|
From: | Liu Jaloo |
Subject: | Re: About "PC_MACHINE_CLASS" definition. |
Date: | Thu, 31 Aug 2023 15:41:47 +0800 |
Hi,
On 31/8/23 05:15, Liu Jaloo wrote:
> Where actually defined the "PC_MACHINE_CLASS", I can't find it in source
> code, please help to point out the file.
It is defined in include/hw/i386/pc.h:
OBJECT_DECLARE_TYPE(PCMachineState, PCMachineClass, PC_MACHINE)
The macro itself is defined in include/qom/object.h:
/**
* OBJECT_DECLARE_TYPE:
* @InstanceType: instance struct name
* @ClassType: class struct name
* @MODULE_OBJ_NAME: the object name in uppercase with underscore
separators
*
* This macro is typically used in a header file, and will:
*
* - create the typedefs for the object and class structs
* - register the type for use with g_autoptr
* - provide three standard type cast functions
*
* The object struct and class struct need to be declared manually.
*/
See the QOM documentation:
https://qemu-project.gitlab.io/qemu/devel/qom.html
Regards,
Phil.
[Prev in Thread] | Current Thread | [Next in Thread] |