summaryrefslogtreecommitdiff
path: root/rust/src/architecture.rs
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2022-07-21 15:24:16 -0400
committerGlenn Smith <glenn@vector35.com>2022-09-29 21:02:22 -0400
commitd552ae9beae6404c13548b98ec7a7ec4e6b3dd90 (patch)
tree00a2696b2a3a33b1ac5bb058801fdea9f1a38c03 /rust/src/architecture.rs
parent2e18783a2f6e29c225d177e8a0fb866a9c9d85df (diff)
[Rust API] Better name for this trait fn, more CC support
Diffstat (limited to 'rust/src/architecture.rs')
-rw-r--r--rust/src/architecture.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/src/architecture.rs b/rust/src/architecture.rs
index 878b2c5e..f1cdead0 100644
--- a/rust/src/architecture.rs
+++ b/rust/src/architecture.rs
@@ -1048,7 +1048,7 @@ macro_rules! cc_func {
/// Contains helper methods for all types implementing 'Architecture'
pub trait ArchitectureExt: Architecture {
fn register_by_name<S: BnStrCompatible>(&self, name: S) -> Option<Self::Register> {
- let name = name.as_bytes_with_nul();
+ let name = name.into_bytes_with_nul();
match unsafe {
BNGetArchitectureRegisterByName(self.as_ref().0, name.as_ref().as_ptr() as *mut _)
@@ -1906,7 +1906,7 @@ where
false
}
- let name = name.as_bytes_with_nul();
+ let name = name.into_bytes_with_nul();
let uninit_arch = ArchitectureBuilder {
arch: unsafe { zeroed() },