diff options
Diffstat (limited to 'rust/src/llil/function.rs')
| -rw-r--r-- | rust/src/llil/function.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/rust/src/llil/function.rs b/rust/src/llil/function.rs index 8f1eac62..abc501e5 100644 --- a/rust/src/llil/function.rs +++ b/rust/src/llil/function.rs @@ -84,10 +84,7 @@ where M: FunctionMutability, F: FunctionForm, { - pub(crate) unsafe fn from_raw( - borrower: A::Handle, - handle: *mut BNLowLevelILFunction, - ) -> Ref<Self> { + pub(crate) unsafe fn from_raw(borrower: A::Handle, handle: *mut BNLowLevelILFunction) -> Self { debug_assert!(!handle.is_null()); Self { @@ -97,7 +94,13 @@ where _mutability: PhantomData, _form: PhantomData, } - .to_owned() + } + + pub(crate) unsafe fn ref_from_raw( + borrower: A::Handle, + handle: *mut BNLowLevelILFunction, + ) -> Ref<Self> { + Ref::new(Self::from_raw(borrower, handle)) } pub(crate) fn arch(&self) -> &A { |
