mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 20:03:54 -06:00
qdev: make properties array "const"
Constify all accesses to qdev properties, except for the ObjectPropertyAccessor itself. This makes it possible to place them in read-only memory, and also lets Rust bindings switch from "static mut" arrays to "static"; which is advantageous, because mutable statics are highly discouraged. Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
11b8920ed2
commit
d36f165d95
4 changed files with 18 additions and 18 deletions
|
@ -751,7 +751,7 @@ DeviceState *qdev_device_add(QemuOpts *opts, Error **errp)
|
|||
|
||||
#define qdev_printf(fmt, ...) monitor_printf(mon, "%*s" fmt, indent, "", ## __VA_ARGS__)
|
||||
|
||||
static void qdev_print_props(Monitor *mon, DeviceState *dev, Property *props,
|
||||
static void qdev_print_props(Monitor *mon, DeviceState *dev, const Property *props,
|
||||
int indent)
|
||||
{
|
||||
if (!props)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue