]> www.infradead.org Git - users/dwmw2/qemu.git/commit
qdev: make properties array "const"
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 18 Oct 2024 09:18:25 +0000 (11:18 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 5 Nov 2024 13:18:14 +0000 (14:18 +0100)
commitd36f165d9523a5d151f11888938fcc66a6dd10df
tree531195304568083712eb91cbf59452e615458351
parent11b8920ed2093848f79f93d106afe8a69a61a523
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>
hw/core/qdev-properties.c
include/hw/qdev-core.h
include/hw/qdev-properties.h
system/qdev-monitor.c