diff options
| author | Mason Reed <mason@vector35.com> | 2024-10-19 19:11:50 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2024-10-19 19:11:50 -0400 |
| commit | 8850303573a90898ec56706767a9ae7ece810f26 (patch) | |
| tree | a7130679f580bb0a1545688227996502c6fd8b0a /rust/src | |
| parent | e34ddc02cb073d762931c2ea5217e7489ef6c4c2 (diff) | |
Add ArchitectureExt::calling_conventions to rust api
Diffstat (limited to 'rust/src')
| -rw-r--r-- | rust/src/architecture.rs | 8 |
1 files changed, 8 insertions, 0 deletions
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<CallingConvention<Self>> { + 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, |
