rust: qom: add default definitions for ObjectImpl

Remove a bunch of duplicate const definitions.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2024-10-28 11:28:23 +01:00
parent ab870fa106
commit b2a4854508
3 changed files with 4 additions and 14 deletions

View file

@ -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 {