Skip to content

Commit

Permalink
Merge pull request #67 from drewcrawford/primitive-types
Browse files Browse the repository at this point in the history
Support additional pointer types
  • Loading branch information
Brendonovich authored Dec 13, 2024
2 parents a9e0e6d + dc87adb commit 01980f9
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 3 deletions.
27 changes: 26 additions & 1 deletion src-rs/swift_arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,32 @@ primitive_impl!(
Float64,
*const c_void,
*mut c_void,
*const u8,
*const Bool,
*mut Bool,
*const Int,
*mut Int,
*const Int8,
*mut Int8,
*const Int16,
*mut Int16,
*const Int32,
*mut Int32,
*const Int64,
*mut Int64,
*const UInt,
*mut UInt,
*const UInt8,
*mut UInt8,
*const UInt16,
*mut UInt16,
*const UInt32,
*mut UInt32,
*const UInt64,
*mut UInt64,
*const Float32,
*mut Float32,
*const Float64,
*mut Float64,
()
);

Expand Down
29 changes: 27 additions & 2 deletions src-rs/swift_ret.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,33 @@ primitive_impl!(
Float64,
*const c_void,
*mut c_void,
*const u8,
()
(),
*const Bool,
*mut Bool,
*const Int,
*mut Int,
*const Int8,
*mut Int8,
*const Int16,
*mut Int16,
*const Int32,
*mut Int32,
*const Int64,
*mut Int64,
*const UInt,
*mut UInt,
*const UInt8,
*mut UInt8,
*const UInt16,
*mut UInt16,
*const UInt32,
*mut UInt32,
*const UInt64,
*mut UInt64,
*const Float32,
*mut Float32,
*const Float64,
*mut Float64
);

impl<T: SwiftObject> SwiftRet for Option<T> {
Expand Down

0 comments on commit 01980f9

Please sign in to comment.