ModularM
Modular2y ago
MM

Accessing C struct members from external_call

Does Mojo's Foreign Function Interface already support calling C functions that return C structs? If so, how to access the struct's members? Isaiah Norton's call_div example (https://github.com/ihnorton/mojo-ffi/blob/ffi-demo/mojo-call-c/call_div.mojo) seems to show it is possible, but I'm unable to get the value of the latter member in Mojo 24.2.1 although running the same code. The value of the first member seems to return correctly.
GitHub
Contribute to ihnorton/mojo-ffi development by creating an account on GitHub.
Was this page helpful?