Instead of duplicating the code here please just inline the C version of the struct here, they will get out of sync.