diff options
| author | KyleMiles <krm504@nyu.edu> | 2021-02-10 22:04:29 +0000 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2021-03-18 01:50:19 +0000 |
| commit | 534c3bc85860d2c14a490cf68ea1174cb9edbfde (patch) | |
| tree | f7b21045d0f2ab855c49da8b38440977f971a72e /rust/src/callingconvention.rs | |
| parent | 1515df8e71412787470b27d04ed9b2944fca0fdc (diff) | |
Better type support
Diffstat (limited to 'rust/src/callingconvention.rs')
| -rw-r--r-- | rust/src/callingconvention.rs | 9 |
1 files changed, 6 insertions, 3 deletions
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<A: Architecture> Send for CallingConvention<A> {} unsafe impl<A: Architecture> Sync for CallingConvention<A> {} impl<A: Architecture> CallingConvention<A> { - 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<Self> { + Ref::new(CallingConvention { handle: handle, arch_handle: arch, _arch: PhantomData, - } + }) } } |
