summaryrefslogtreecommitdiff
path: root/rust/src/function.rs
diff options
context:
space:
mode:
authorrbran <git@rubens.io>2025-04-23 19:24:45 +0000
committerMason Reed <35282038+emesare@users.noreply.github.com>2025-05-12 17:45:24 -0400
commitc2d90f2e5a010546d0e1f1deeb1a6d8531ea4d4f (patch)
tree20a6c6268943154fdda6a4d6884f2f29d9d4de50 /rust/src/function.rs
parent4a4a8488269922269b20a12a7b71272b925b9f18 (diff)
[Rust] Implement custom interactive handler
Diffstat (limited to 'rust/src/function.rs')
-rw-r--r--rust/src/function.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/rust/src/function.rs b/rust/src/function.rs
index edde15a7..e7e5e9b0 100644
--- a/rust/src/function.rs
+++ b/rust/src/function.rs
@@ -480,15 +480,15 @@ impl Function {
/// Get the language representation of the function.
///
/// * `language` - The language representation, ex. "Pseudo C".
- pub fn language_representation<S: BnStrCompatible>(
+ pub fn language_representation(
&self,
- language: S,
+ language: &str,
) -> Option<Ref<CoreLanguageRepresentationFunction>> {
- let lang_name = language.into_bytes_with_nul();
+ let lang_name = language.to_cstr();
let repr = unsafe {
BNGetFunctionLanguageRepresentation(
self.handle,
- lang_name.as_ref().as_ptr() as *const c_char,
+ lang_name.as_ptr(),
)
};
NonNull::new(repr)
@@ -498,15 +498,15 @@ impl Function {
/// Get the language representation of the function, if available.
///
/// * `language` - The language representation, ex. "Pseudo C".
- pub fn language_representation_if_available<S: BnStrCompatible>(
+ pub fn language_representation_if_available(
&self,
- language: S,
+ language: &str,
) -> Option<Ref<CoreLanguageRepresentationFunction>> {
- let lang_name = language.into_bytes_with_nul();
+ let lang_name = language.to_cstr();
let repr = unsafe {
BNGetFunctionLanguageRepresentationIfAvailable(
self.handle,
- lang_name.as_ref().as_ptr() as *const c_char,
+ lang_name.as_ptr(),
)
};
NonNull::new(repr)