- char*paramstr = params_tostring(m->parameters);
- fprintf(fo, "%s%s%s %s %s=%s %s (%d params, %d optional)\n", prefix, attr, type, return_type, name, m->name, paramstr,
- list_length(m->parameters),
- list_length(m->optional_parameters)
- );
- free(paramstr);paramstr=0;
+
+ fprintf(fo, "%s", prefix);
+ fprintf(fo, "%s %s", attr, type);
+ fprintf(fo, "%s %s=%s", return_type, name, m->name);
+ params_dump(fo, m->parameters, m->optional_parameters);
+ fprintf(fo, "(%d params, %d optional)\n", list_length(m->parameters), list_length(m->optional_parameters));
+