diff options
author | Dj <43033058+DjDeveloperr@users.noreply.github.com> | 2023-01-07 19:58:10 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-08 09:28:10 +0530 |
commit | ad82918f56b215a428ebe7c533ee825e1152d1b4 (patch) | |
tree | 2669f9d8d419a88e9d58b12b98579e884aec6988 /ext/ffi/static.rs | |
parent | 84ef26ac9b5f0e1199d77837cd97cb203baa8729 (diff) |
feat(ext/ffi): structs by value (#15060)
Adds support for passing and returning structs as buffers to FFI. This does not implement fastapi support for structs. Needed for certain system APIs such as AppKit on macOS.
Diffstat (limited to 'ext/ffi/static.rs')
-rw-r--r-- | ext/ffi/static.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/ffi/static.rs b/ext/ffi/static.rs index 87c09dbfb..9ea0d616d 100644 --- a/ext/ffi/static.rs +++ b/ext/ffi/static.rs @@ -142,5 +142,8 @@ pub fn op_ffi_get_static<'scope>( }; integer.into() } + NativeType::Struct(_) => { + return Err(type_error("Invalid FFI static type 'struct'")); + } }) } |