12 lines
415 B
Rust
12 lines
415 B
Rust
use crate::dynamic_data::{Gen7MiscLibrary, MiscLibrary};
|
|
use crate::ffi::IdentifiablePointer;
|
|
|
|
/// Instantiates a new MiscLibrary.
|
|
#[no_mangle]
|
|
extern "C" fn gen_7_misc_library_new() -> IdentifiablePointer<Box<dyn MiscLibrary>> {
|
|
let v: Box<dyn MiscLibrary> = Box::new(Gen7MiscLibrary::new());
|
|
let id = v.value_identifier();
|
|
let ptr = Box::into_raw(Box::new(v));
|
|
IdentifiablePointer::new(ptr, id)
|
|
}
|