From 534c3bc85860d2c14a490cf68ea1174cb9edbfde Mon Sep 17 00:00:00 2001 From: KyleMiles Date: Wed, 10 Feb 2021 22:04:29 +0000 Subject: Better type support --- rust/src/callingconvention.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'rust/src/callingconvention.rs') diff --git a/rust/src/callingconvention.rs b/rust/src/callingconvention.rs index 4af9b9c9..dcb88970 100644 --- a/rust/src/callingconvention.rs +++ b/rust/src/callingconvention.rs @@ -409,12 +409,15 @@ unsafe impl Send for CallingConvention {} unsafe impl Sync for CallingConvention {} impl CallingConvention { - pub(crate) unsafe fn from_raw(handle: *mut BNCallingConvention, arch: A::Handle) -> Self { - CallingConvention { + pub(crate) unsafe fn ref_from_raw( + handle: *mut BNCallingConvention, + arch: A::Handle, + ) -> Ref { + Ref::new(CallingConvention { handle: handle, arch_handle: arch, _arch: PhantomData, - } + }) } } -- cgit v1.3.1