I suggest using MCListRef here...
```
MCListRef t_output;
/* UNCHECKED */ MCListCreateMutable('\n', t_output);
...
if (...)
  /* UNCHECKED */ MCListAppendCString(...);
...
/* UNCHECKED */ MCListCopyAsStringAndRelease(t_output, r_output);
```