summaryrefslogtreecommitdiff
path: root/rust/src/high_level_il/function.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/high_level_il/function.rs')
-rw-r--r--rust/src/high_level_il/function.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/rust/src/high_level_il/function.rs b/rust/src/high_level_il/function.rs
index 0813ad04..a65a244c 100644
--- a/rust/src/high_level_il/function.rs
+++ b/rust/src/high_level_il/function.rs
@@ -15,12 +15,17 @@ pub struct HighLevelILFunction {
}
impl HighLevelILFunction {
+ pub(crate) unsafe fn from_raw(handle: *mut BNHighLevelILFunction, full_ast: bool) -> Self {
+ debug_assert!(!handle.is_null());
+ Self { handle, full_ast }
+ }
+
pub(crate) unsafe fn ref_from_raw(
handle: *mut BNHighLevelILFunction,
full_ast: bool,
) -> Ref<Self> {
debug_assert!(!handle.is_null());
- Self { handle, full_ast }.to_owned()
+ Ref::new(Self { handle, full_ast })
}
pub fn instruction_from_index(