-
Notifications
You must be signed in to change notification settings - Fork 48
fix(swift-sdk): minimally unblock iOS CI build plumbing #3143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
938d649
536d8bf
3d900e5
096ac55
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,11 +17,15 @@ pub type GetGapLimitFn = unsafe extern "C" fn(context: *mut c_void) -> u32; | |
|
|
||
| /// Function pointer type for checking if there are pending addresses | ||
| pub type HasPendingFn = unsafe extern "C" fn(context: *mut c_void) -> bool; | ||
| /// Nullable function pointer for checking if there are pending addresses | ||
| pub type NullableHasPendingFn = Option<unsafe extern "C" fn(context: *mut c_void) -> bool>; | ||
|
|
||
| /// Function pointer type for getting the highest found index | ||
| /// | ||
| /// Returns the highest found index, or u32::MAX if none found | ||
| pub type GetHighestFoundIndexFn = unsafe extern "C" fn(context: *mut c_void) -> u32; | ||
| /// Nullable function pointer for getting the highest found index | ||
| pub type NullableGetHighestFoundIndexFn = Option<unsafe extern "C" fn(context: *mut c_void) -> u32>; | ||
|
|
||
| /// Function pointer type for handling a found address | ||
| /// | ||
|
|
@@ -43,6 +47,8 @@ pub type OnAddressAbsentFn = | |
|
|
||
| /// Optional destructor for cleanup | ||
| pub type DestroyProviderFn = unsafe extern "C" fn(context: *mut c_void); | ||
| /// Nullable function pointer for provider cleanup | ||
| pub type NullableDestroyProviderFn = Option<unsafe extern "C" fn(context: *mut c_void)>; | ||
|
|
||
| /// VTable for address provider callbacks | ||
| #[repr(C)] | ||
|
|
@@ -61,14 +67,14 @@ pub struct AddressProviderVTable { | |
|
|
||
| /// Check if there are still pending addresses | ||
| /// If null, the default implementation (pending_addresses is non-empty) is used | ||
| pub has_pending: Option<HasPendingFn>, | ||
| pub has_pending: NullableHasPendingFn, | ||
|
|
||
| /// Get the highest found index | ||
| /// If null, returns None | ||
| pub highest_found_index: Option<GetHighestFoundIndexFn>, | ||
| pub highest_found_index: NullableGetHighestFoundIndexFn, | ||
|
|
||
| /// Optional destructor for cleanup | ||
| pub destroy: Option<DestroyProviderFn>, | ||
| pub destroy: NullableDestroyProviderFn, | ||
| } | ||
|
Comment on lines
76
to
78
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # Search for Drop implementations for AddressProviderFFI and CallbackAddressProvider
rg -n "impl Drop for AddressProviderFFI|impl Drop for CallbackAddressProvider" --type rust -C 3Repository: dashpay/platform Length of output: 42 🏁 Script executed: # Check the file under review to understand the structure
cat -n packages/rs-sdk-ffi/src/address_sync/provider.rsRepository: dashpay/platform Length of output: 10790 🏁 Script executed: # Search more broadly for Drop implementations in the FFI codebase
rg -n "impl Drop" packages/rs-sdk-ffi/ --type rustRepository: dashpay/platform Length of output: 42 Implement Currently, impl Drop for AddressProviderFFI {
fn drop(&mut self) {
unsafe {
let vtable = &*self.vtable;
if let Some(destroy) = vtable.destroy {
destroy(self.context);
}
}
}
}🤖 Prompt for AI Agents |
||
|
|
||
| /// FFI-compatible address provider using callbacks | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.