Il mar 22 ott 2024, 23:43 Philippe Mathieu-Daudé ha
scritto:
> On 22/10/24 02:23, Paolo Bonzini wrote:
> > At least keeping the const
> > within qdev properties makes things "safer" within that realm.
>
> Since it is only within qdev-properties.c, it is indeed reasonable to
> accept. Maybe make i
On 22/10/24 02:23, Paolo Bonzini wrote:
On Tue, Oct 22, 2024 at 6:31 AM Philippe Mathieu-Daudé
wrote:
-void qdev_property_add_static(DeviceState *dev, Property *prop)
+void qdev_property_add_static(DeviceState *dev, const Property *prop)
{
Object *obj = OBJECT(dev);
ObjectPrope
On Tue, Oct 22, 2024 at 6:31 AM Philippe Mathieu-Daudé
wrote:
> > -void qdev_property_add_static(DeviceState *dev, Property *prop)
> > +void qdev_property_add_static(DeviceState *dev, const Property *prop)
> > {
> > Object *obj = OBJECT(dev);
> > ObjectProperty *op;
> > @@ -980,7 +98
Hi,
On 21/10/24 13:35, Paolo Bonzini wrote:
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 m
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.
Signed-