Browse Source

qom: Constify TypeInfo::interfaces

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20250424194905.82506-6-philmd@linaro.org>
pull/291/head
Philippe Mathieu-Daudé 11 months ago
parent
commit
231bf6dda1
  1. 2
      hw/scsi/megasas.c
  2. 2
      include/hw/virtio/virtio-pci.h
  3. 2
      include/qom/object.h
  4. 2
      rust/qemu-api/src/qom.rs

2
hw/scsi/megasas.c

@ -2486,7 +2486,7 @@ typedef struct MegasasInfo {
const VMStateDescription *vmsd;
const Property *props;
size_t props_count;
InterfaceInfo *interfaces;
const InterfaceInfo *interfaces;
} MegasasInfo;
static struct MegasasInfo megasas_devices[] = {

2
include/hw/virtio/virtio-pci.h

@ -256,7 +256,7 @@ typedef struct VirtioPCIDeviceTypeInfo {
void (*instance_init)(Object *obj);
void (*instance_finalize)(Object *obj);
void (*class_init)(ObjectClass *klass, const void *data);
InterfaceInfo *interfaces;
const InterfaceInfo *interfaces;
} VirtioPCIDeviceTypeInfo;
/* Register virtio-pci type(s). @t must be static. */

2
include/qom/object.h

@ -490,7 +490,7 @@ struct TypeInfo
void (*class_base_init)(ObjectClass *klass, const void *data);
const void *class_data;
InterfaceInfo *interfaces;
const InterfaceInfo *interfaces;
};
/**

2
rust/qemu-api/src/qom.rs

@ -514,7 +514,7 @@ pub trait ObjectImpl: ObjectType + IsA<Object> {
class_init: Some(rust_class_init::<Self>),
class_base_init: Self::CLASS_BASE_INIT,
class_data: core::ptr::null(),
interfaces: core::ptr::null_mut(),
interfaces: core::ptr::null(),
};
// methods on ObjectClass

Loading…
Cancel
Save