diff options
Diffstat (limited to 'rust/src/calling_convention.rs')
| -rw-r--r-- | rust/src/calling_convention.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/src/calling_convention.rs b/rust/src/calling_convention.rs index 6f2e9a1c..f0f0ba4c 100644 --- a/rust/src/calling_convention.rs +++ b/rust/src/calling_convention.rs @@ -58,7 +58,7 @@ pub trait CallingConvention: Sync { pub fn register_calling_convention<A, N, C>(arch: &A, name: N, cc: C) -> Ref<CoreCallingConvention> where A: Architecture, - N: BnStrCompatible, + N: AsCStr, C: 'static + CallingConvention, { struct CustomCallingConventionContext<C> @@ -377,7 +377,7 @@ where ) } - let name = name.into_bytes_with_nul(); + let name = name.to_cstr(); let raw = Box::into_raw(Box::new(CustomCallingConventionContext { raw_handle: std::ptr::null_mut(), cc, |
