diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-05-02 17:58:54 +0200 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-05-06 16:02:04 +0200 |
| commit | 3a1c694d74deb478d9822e585e90c5903852eb84 (patch) | |
| tree | 8c13f611f8170f0632af0946ff2f24c693259211 /rust/qemu-api/src/timer.rs | |
| parent | 0823837224be428d643dc7000fa534f8aedea5fd (diff) | |
| download | focaccia-qemu-3a1c694d74deb478d9822e585e90c5903852eb84.tar.gz focaccia-qemu-3a1c694d74deb478d9822e585e90c5903852eb84.zip | |
rust: qom: fix TODO about zeroability of classes
The proposed suggestion is not correct. First it is not necessary for *all* classes to be Zeroable, only for Rust-defined ones; classes defined in C never implement ObjectImpl. Second, the parent class field need not be Zeroable. For example, ChardevClass's chr_write and chr_be_event fields cannot be NULL, therefore ChardevClass cannot be Zeroable. However, char_class_init() initializes them, therefore ChardevClass could be subclassed by Rust code. Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/src/timer.rs')
0 files changed, 0 insertions, 0 deletions