static char* S_add_xsub_spec(char *xsub_specs, CFCPerlSub *xsub) { const char *c_name = CFCPerlSub_c_name(xsub); const char *alias = CFCPerlSub_get_alias(xsub); const char *sep = xsub_specs[0] == '\0' ? "" : ",\n"; xsub_specs = CFCUtil_cat(xsub_specs, sep, " { \"", alias, "\", ", c_name, " }", NULL); return xsub_specs; }
static char* S_add_xs_init(char *xs_init, CFCPerlSub *xsub) { const char *c_name = CFCPerlSub_c_name(xsub); const char *perl_name = CFCPerlSub_perl_name(xsub); if (strlen(xs_init)) { xs_init = CFCUtil_cat(xs_init, "\n ", NULL); } xs_init = CFCUtil_cat(xs_init, "newXS(\"", perl_name, "\", ", c_name, ", file);", NULL); return xs_init; }