[C] More macro error handling.
[C] Use typedef for internal structs.