mirror of https://gitee.com/openkylin/libvirt.git
cpu: Properly define g_autoptr for virCPUData
The structure is not specific to x86 and thus its cleanup function should be defined in cpu.h and be available to all users. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
62c27cfc4f
commit
8e3b77a0e4
|
@ -182,6 +182,7 @@ virCPUDataNew(virArch arch);
|
|||
|
||||
void
|
||||
virCPUDataFree(virCPUDataPtr data);
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virCPUData, virCPUDataFree);
|
||||
|
||||
bool
|
||||
virCPUGetHostIsSupported(virArch arch);
|
||||
|
|
|
@ -495,7 +495,6 @@ virCPUx86DataFree(virCPUDataPtr data)
|
|||
virCPUx86DataClear(&data->data.x86);
|
||||
VIR_FREE(data);
|
||||
}
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virCPUData, virCPUx86DataFree);
|
||||
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue