Initial work on DynamicLibrary up to and including the Pokemon model.
This commit is contained in:
@@ -3,6 +3,7 @@ use crate::dynamic_data::{
|
||||
};
|
||||
use crate::ffi::{IdentifiablePointer, OwnedPtr};
|
||||
use crate::static_data::StaticData;
|
||||
use std::ptr::drop_in_place;
|
||||
use std::sync::Arc;
|
||||
|
||||
/// Instantiates a new DynamicLibrary with given parameters.
|
||||
@@ -25,3 +26,9 @@ extern "C" fn dynamic_library_new(
|
||||
a.into()
|
||||
}
|
||||
}
|
||||
|
||||
/// Drops a dynamic library.
|
||||
#[no_mangle]
|
||||
extern "C" fn dynamic_library_drop(ptr: OwnedPtr<Arc<dyn StaticData>>) {
|
||||
unsafe { drop_in_place(ptr) };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user