summaryrefslogtreecommitdiff
path: root/rust/src/high_level_il/function.rs
diff options
context:
space:
mode:
authorrbran <git@rubens.io>2025-04-10 12:58:27 +0000
committerMason Reed <35282038+emesare@users.noreply.github.com>2025-05-12 17:45:24 -0400
commit4d8feb4921cde4b70bb6db4ccd525a69205dee7f (patch)
treeedbd6845590fef0b2813ee30c16607e1ae8d8e32 /rust/src/high_level_il/function.rs
parent067148afd1a8f9153bb5bfe6b5361b83e9f89ab6 (diff)
[Rust] Implement `LanguageRepresentation` and `LineFormatter`
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(