mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-02 09:51:07 +00:00
target/arm/cpu: Use type_register instead of type_register_static() in arm_cpu_register_types()
The lifetime of the TypeInfo instance doesn't live indefinitely, so we should be using the regular type_register().
This commit is contained in:
parent
34b22968a4
commit
e81fa596bc
|
@ -1708,7 +1708,7 @@ void arm_cpu_register_types(void *opaque)
|
|||
{
|
||||
const ARMCPUInfo *info = arm_cpus;
|
||||
|
||||
TypeInfo arm_cpu_type_info = { 0 };
|
||||
TypeInfo arm_cpu_type_info = {0};
|
||||
arm_cpu_type_info.name = TYPE_ARM_CPU,
|
||||
arm_cpu_type_info.parent = TYPE_CPU,
|
||||
arm_cpu_type_info.instance_userdata = opaque,
|
||||
|
@ -1720,7 +1720,7 @@ void arm_cpu_register_types(void *opaque)
|
|||
arm_cpu_type_info.class_size = sizeof(ARMCPUClass),
|
||||
arm_cpu_type_info.class_init = arm_cpu_class_init,
|
||||
|
||||
type_register_static(opaque, &arm_cpu_type_info);
|
||||
type_register(opaque, &arm_cpu_type_info);
|
||||
|
||||
while (info->name) {
|
||||
cpu_register(opaque, info);
|
||||
|
|
Loading…
Reference in a new issue