Adds species_drop FFI method.
This commit is contained in:
parent
1070753be7
commit
78fde698ca
|
@ -3,6 +3,7 @@ use crate::static_data::{Form, Species};
|
|||
use crate::StringKey;
|
||||
use hashbrown::HashSet;
|
||||
use std::ffi::{c_char, CStr};
|
||||
use std::ptr::drop_in_place;
|
||||
use std::sync::Arc;
|
||||
|
||||
#[no_mangle]
|
||||
|
@ -35,6 +36,11 @@ unsafe extern "C" fn species_new(
|
|||
)))
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
unsafe extern "C" fn species_drop(ptr: OwnedPtr<Species>) {
|
||||
drop_in_place(ptr);
|
||||
}
|
||||
|
||||
ffi_getter!(Species, id, u16);
|
||||
ffi_stringkey_getter!(Species, name);
|
||||
ffi_getter!(Species, gender_rate, f32);
|
||||
|
|
Loading…
Reference in New Issue