From 72fcf44f3731ade3cf1310da55f633f1cb9069ce Mon Sep 17 00:00:00 2001 From: 0cyn Date: Wed, 22 Oct 2025 02:37:05 -0400 Subject: Refactor Plugin Load/Management to support upcoming changes --- rust/src/repository/plugin.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'rust/src/repository/plugin.rs') diff --git a/rust/src/repository/plugin.rs b/rust/src/repository/plugin.rs index e0ab9679..45d0e684 100644 --- a/rust/src/repository/plugin.rs +++ b/rust/src/repository/plugin.rs @@ -11,15 +11,15 @@ use std::time::{Duration, SystemTime, UNIX_EPOCH}; #[repr(transparent)] pub struct RepositoryPlugin { - handle: NonNull, + handle: NonNull, } impl RepositoryPlugin { - pub(crate) unsafe fn from_raw(handle: NonNull) -> Self { + pub(crate) unsafe fn from_raw(handle: NonNull) -> Self { Self { handle } } - pub(crate) unsafe fn ref_from_raw(handle: NonNull) -> Ref { + pub(crate) unsafe fn ref_from_raw(handle: NonNull) -> Ref { Ref::new(Self { handle }) } @@ -33,7 +33,7 @@ impl RepositoryPlugin { /// String of the plugin author pub fn author(&self) -> String { - let result = unsafe { BNPluginGetAuthor(self.handle.as_ptr()) }; + let result = unsafe { BNPluginGetAuthorUrl(self.handle.as_ptr()) }; assert!(!result.is_null()); unsafe { BnString::into_string(result as *mut c_char) } } @@ -287,7 +287,7 @@ unsafe impl RefCountable for RepositoryPlugin { } impl CoreArrayProvider for RepositoryPlugin { - type Raw = *mut BNRepoPlugin; + type Raw = *mut BNPlugin; type Context = (); type Wrapped<'a> = Guard<'a, Self>; } -- cgit v1.3.1