Remove private Vec ffi wrapper from public API
diff --git a/macro/src/expand.rs b/macro/src/expand.rs
index 89d15a9..5554d28 100644
--- a/macro/src/expand.rs
+++ b/macro/src/expand.rs
@@ -250,12 +250,12 @@
}
Type::RustBox(_) => quote!(::std::boxed::Box::into_raw(#var)),
Type::UniquePtr(_) => quote!(::cxx::UniquePtr::into_raw(#var)),
- Type::RustVec(_) => quote!(::cxx::RustVec::from(#var)),
+ Type::RustVec(_) => quote!(::cxx::private::RustVec::from(#var)),
Type::Ref(ty) => match &ty.inner {
Type::Ident(ident) if ident == RustString => {
quote!(::cxx::private::RustString::from_ref(#var))
}
- Type::RustVec(_) => quote!(::cxx::RustVec::from_ref(#var)),
+ Type::RustVec(_) => quote!(::cxx::private::RustVec::from_ref(#var)),
_ => quote!(#var),
},
Type::Str(_) => quote!(::cxx::private::RustStr::from(#var)),
@@ -593,12 +593,12 @@
quote_spanned! {span=>
#[doc(hidden)]
#[export_name = #link_drop]
- unsafe extern "C" fn #local_drop(this: *mut ::cxx::RustVec<#inner>) {
+ unsafe extern "C" fn #local_drop(this: *mut ::cxx::private::RustVec<#inner>) {
::std::ptr::drop_in_place(this);
}
#[doc(hidden)]
#[export_name = #link_len]
- unsafe extern "C" fn #local_len(this: *const ::cxx::RustVec<#inner>) -> usize {
+ unsafe extern "C" fn #local_len(this: *const ::cxx::private::RustVec<#inner>) -> usize {
(*this).len()
}
}
@@ -782,12 +782,12 @@
let inner = expand_extern_type(&ty.inner);
quote!(*mut #inner)
}
- Type::RustVec(ty) => quote!(::cxx::RustVec<#ty>),
+ Type::RustVec(ty) => quote!(::cxx::private::RustVec<#ty>),
Type::Ref(ty) => match &ty.inner {
Type::Ident(ident) if ident == RustString => quote!(&::cxx::private::RustString),
Type::RustVec(ty) => {
let inner = expand_extern_type(&ty.inner);
- quote!(&::cxx::RustVec<#inner>)
+ quote!(&::cxx::private::RustVec<#inner>)
}
_ => quote!(#ty),
},
diff --git a/src/lib.rs b/src/lib.rs
index e23be69..a8ce904 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -378,7 +378,6 @@
pub use crate::cxx_string::CxxString;
pub use crate::exception::Exception;
-pub use crate::rust_vec::RustVec;
pub use crate::unique_ptr::UniquePtr;
pub use crate::vector::RealVector;
pub use crate::vector::VectorIntoIterator;
@@ -393,6 +392,7 @@
pub use crate::rust_sliceu8::RustSliceU8;
pub use crate::rust_str::RustStr;
pub use crate::rust_string::RustString;
+ pub use crate::rust_vec::RustVec;
pub use crate::unique_ptr::UniquePtrTarget;
pub use crate::unwind::catch_unwind;
pub use crate::vector::VectorTarget;