You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[no_mangle]pubextern"C"fntime_series_eval(exprs:*mutNSArray<NSString>,error:&mut*mutNSError,) -> *mutNSDictionary<NSString,NSArray>{let exprs = exprs.as_ref().unwrap().iter();// do something with exprs}
~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/icrate-0.1.0/src/generated/Foundation/NSEnumerator.rs:6:1:
invalid message send to -[Swift.__SwiftDeferredNSArray countByEnumeratingWithState:objects:count:]: expected return to have type code 'q', but found 'Q'
I think this is telling me that Swift arrays and objc2's arrays don't agree on signed vs unsigned?
The text was updated successfully, but these errors were encountered:
I think this is telling me that Swift arrays and objc2's arrays don't agree on signed vs unsigned?
Rather, Swift is lazy and uses Int instead of the more correct type UInt here; the difference doesn't really matter to them, as arrays likely won't be able to ever get so large that it matters.
I've opened #567 to fix this, although I'm a bit unsure what the right approach is. In the meantime the easiest fix for you is probably to do one of:
Thanks for the quick response. I took a local copy of the repo and did a quick hack equivalent to #567 that avoided the problem and I'll try taking a Git dependency on #567 for now.
I'm exposing this Rust function to Swift:
I call it like this from the Swift side:
But the Rust panics:
I think this is telling me that Swift arrays and objc2's arrays don't agree on signed vs unsigned?
The text was updated successfully, but these errors were encountered: