Skip to content

Commit

Permalink
Add callout for helping add "struct by value" to Pony (#528)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTAllen authored Jan 16, 2024
1 parent 167f141 commit 3c3f51d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/c-ffi/calling-c.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ var iov = (data.cpointer(), data.size())

In the example above, the type `Pointer[(Pointer[U8] tag, USize)] tag` is equivalent to the `IOVec` struct type we defined earlier. That is, _a struct type is equivalent to a pointer to a tuple type with the fields of the struct as elements, in the same order as the original struct type defined them_.

**Can I pass struct types by value, instead of passing a pointer?** Not at the moment. This is a known limitation of the current FFI system, but it is something the Pony team is interested in fixing.
**Can I pass struct types by value, instead of passing a pointer?** Not at the moment. This is a known limitation of the current FFI system, but it is something the Pony team is interested in fixing. If you'd like to work on adding support for passing structs by value, contact us [on the Zulip](https://ponylang.zulipchat.com/#narrow/stream/192795-contribute-to-Pony).

### Working with Structs: from C to Pony

Expand Down

0 comments on commit 3c3f51d

Please sign in to comment.