diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-10-28 11:28:23 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-12-10 18:49:26 +0100 |
commit | b2a4854508a02fc8a585890e0272c8ae5fbad5c1 (patch) | |
tree | 6115dd346dc1995437e17673db9959085897be55 /rust/qemu-api/src/definitions.rs | |
parent | ab870fa106e0e3f48db2c5ef0507d107b1b41a21 (diff) | |
download | qemu-b2a4854508a02fc8a585890e0272c8ae5fbad5c1.zip qemu-b2a4854508a02fc8a585890e0272c8ae5fbad5c1.tar.gz qemu-b2a4854508a02fc8a585890e0272c8ae5fbad5c1.tar.bz2 |
rust: qom: add default definitions for ObjectImpl
Remove a bunch of duplicate const definitions.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/src/definitions.rs')
-rw-r--r-- | rust/qemu-api/src/definitions.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rust/qemu-api/src/definitions.rs b/rust/qemu-api/src/definitions.rs index 2659793..92b3c6f 100644 --- a/rust/qemu-api/src/definitions.rs +++ b/rust/qemu-api/src/definitions.rs @@ -14,10 +14,10 @@ pub trait ObjectImpl { const TYPE_INFO: TypeInfo; const TYPE_NAME: &'static CStr; const PARENT_TYPE_NAME: Option<&'static CStr>; - const ABSTRACT: bool; - const INSTANCE_INIT: Option<unsafe extern "C" fn(obj: *mut Object)>; - const INSTANCE_POST_INIT: Option<unsafe extern "C" fn(obj: *mut Object)>; - const INSTANCE_FINALIZE: Option<unsafe extern "C" fn(obj: *mut Object)>; + const ABSTRACT: bool = false; + const INSTANCE_INIT: Option<unsafe extern "C" fn(obj: *mut Object)> = None; + const INSTANCE_POST_INIT: Option<unsafe extern "C" fn(obj: *mut Object)> = None; + const INSTANCE_FINALIZE: Option<unsafe extern "C" fn(obj: *mut Object)> = None; } pub trait Class { |