summaryrefslogtreecommitdiff
path: root/rust/src/platform.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/platform.rs')
-rw-r--r--rust/src/platform.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/rust/src/platform.rs b/rust/src/platform.rs
index d7d3b990..013f709d 100644
--- a/rust/src/platform.rs
+++ b/rust/src/platform.rs
@@ -82,7 +82,7 @@ impl Platform {
Ref::new(Self { handle })
}
- pub fn by_name<S: IntoCStr>(name: S) -> Option<Ref<Self>> {
+ pub fn by_name(name: &str) -> Option<Ref<Self>> {
let raw_name = name.to_cstr();
unsafe {
let res = BNGetPlatformByName(raw_name.as_ptr());
@@ -113,7 +113,7 @@ impl Platform {
}
}
- pub fn list_by_os<S: IntoCStr>(name: S) -> Array<Platform> {
+ pub fn list_by_os(name: &str) -> Array<Platform> {
let raw_name = name.to_cstr();
unsafe {
@@ -124,7 +124,7 @@ impl Platform {
}
}
- pub fn list_by_os_and_arch<S: IntoCStr>(name: S, arch: &CoreArchitecture) -> Array<Platform> {
+ pub fn list_by_os_and_arch(name: &str, arch: &CoreArchitecture) -> Array<Platform> {
let raw_name = name.to_cstr();
unsafe {
@@ -145,7 +145,7 @@ impl Platform {
}
}
- pub fn new<A: Architecture, S: IntoCStr>(arch: &A, name: S) -> Ref<Self> {
+ pub fn new<A: Architecture>(arch: &A, name: &str) -> Ref<Self> {
let name = name.to_cstr();
unsafe {
let handle = BNCreatePlatform(arch.as_ref().handle, name.as_ptr());
@@ -173,7 +173,7 @@ impl Platform {
unsafe { TypeContainer::from_raw(type_container_ptr.unwrap()) }
}
- pub fn get_type_libraries_by_name<T: IntoCStr>(&self, name: T) -> Array<TypeLibrary> {
+ pub fn get_type_libraries_by_name(&self, name: &str) -> Array<TypeLibrary> {
let mut count = 0;
let name = name.to_cstr();
let result =
@@ -182,9 +182,8 @@ impl Platform {
unsafe { Array::new(result, count, ()) }
}
- pub fn register_os<S: IntoCStr>(&self, os: S) {
+ pub fn register_os(&self, os: &str) {
let os = os.to_cstr();
-
unsafe {
BNRegisterPlatform(os.as_ptr(), self.handle);
}