At first look the Odin version seems less verbose.
The function/struct definition in C could be placed in a header.