MM
MM
MModular
Created by MM on 4/19/2024 in #questions
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.
8 replies