getting C interface right