From 4d8feb4921cde4b70bb6db4ccd525a69205dee7f Mon Sep 17 00:00:00 2001 From: rbran Date: Thu, 10 Apr 2025 12:58:27 +0000 Subject: [Rust] Implement `LanguageRepresentation` and `LineFormatter` --- rust/src/high_level_il/function.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'rust/src/high_level_il/function.rs') 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 { debug_assert!(!handle.is_null()); - Self { handle, full_ast }.to_owned() + Ref::new(Self { handle, full_ast }) } pub fn instruction_from_index( -- cgit v1.3.1