easy: move C helpers to cwrap.h