From 8850303573a90898ec56706767a9ae7ece810f26 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sat, 19 Oct 2024 19:11:50 -0400 Subject: Add ArchitectureExt::calling_conventions to rust api --- rust/src/architecture.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'rust/src') diff --git a/rust/src/architecture.rs b/rust/src/architecture.rs index cf5d32d6..b5a1cfdb 100644 --- a/rust/src/architecture.rs +++ b/rust/src/architecture.rs @@ -1610,6 +1610,14 @@ pub trait ArchitectureExt: Architecture { } } + fn calling_conventions(&self) -> Array> { + unsafe { + let mut count = 0; + let calling_convs = BNGetArchitectureCallingConventions(self.as_ref().0, &mut count); + Array::new(calling_convs, count, self.handle()) + } + } + cc_func!( get_default_calling_convention, BNGetArchitectureDefaultCallingConvention, -- cgit v1.3.1