writeln!(w, "#[allow(unused)]").unwrap();
writeln!(w, "/// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy").unwrap();
writeln!(w, "impl {} {{", struct_name).unwrap();
- writeln!(w, "\tpub(crate) fn take_ptr(mut self) -> *mut native{} {{", struct_name).unwrap();
+ writeln!(w, "\tpub(crate) fn take_inner(mut self) -> *mut native{} {{", struct_name).unwrap();
writeln!(w, "\t\tassert!(self.is_owned);").unwrap();
writeln!(w, "\t\tlet ret = self.inner;").unwrap();
writeln!(w, "\t\tself.inner = std::ptr::null_mut();").unwrap();
// List of structs we map (possibly during processing of other files):
"ln::features::InitFeatures" if is_ref => Some(".inner) }"),
- "ln::features::InitFeatures" if !is_ref => Some(".take_ptr()) }"),
+ "ln::features::InitFeatures" if !is_ref => Some(".take_inner()) }"),
// List of traits we map (possibly during processing of other files):
"crate::util::logger::Logger" => Some(""),
|w, decl_type, _full_path, is_ref, _is_mut| match decl_type {
DeclType::StructImported if is_ref && ptr_for_ref => write!(w, ").inner }}").unwrap(),
DeclType::StructImported if is_ref => write!(w, ".inner }}").unwrap(),
- DeclType::StructImported if !is_ref => write!(w, ".take_ptr()) }}").unwrap(),
+ DeclType::StructImported if !is_ref => write!(w, ".take_inner()) }}").unwrap(),
DeclType::MirroredEnum if is_ref => write!(w, ".to_native()").unwrap(),
DeclType::MirroredEnum => write!(w, ".into_native()").unwrap(),
DeclType::Trait(_) => {},