Re: [PATCH v2 11/13] rust: make properties array immutable

2024-10-25 Thread Zhao Liu
On Mon, Oct 21, 2024 at 06:35:36PM +0200, Paolo Bonzini wrote: > Date: Mon, 21 Oct 2024 18:35:36 +0200 > From: Paolo Bonzini > Subject: [PATCH v2 11/13] rust: make properties array immutable > X-Mailer: git-send-email 2.46.2 > > Now that device_class_set_props() takes a const

[PATCH v2 11/13] rust: make properties array immutable

2024-10-21 Thread Paolo Bonzini
Now that device_class_set_props() takes a const pointer, the only part of "define_property!" that needs to be non-const is the call to try_into(). This in turn will only break if offset_of returns a value with the most significant bit set (i.e. a struct size that is >=2^31 or >= 2^63, respectively