wrap_c: add type_rewriter callback