This function invokes `dtwalk` passing the callback `global` to be called with
a state parameter it supplies. It was supplying `cc`, but the callback only uses
a single member of this struct. So we can simplify this code by just passing the
stream the callback writes to, `cc->ccdisc-text`, or equivalently `disc->text`.
{
(void)table;
- Excc_t* cc = handle;
+ Sfio_t *stream = handle;
Exid_t* sym = object;
if (sym->lex == DYNAMIC)
- sfprintf(cc->ccdisc->text, "static %s %s;\n", extype(sym->type), sym->name);
+ sfprintf(stream, "static %s %s;\n", extype(sym->type), sym->name);
return 0;
}
if (*id)
snprintf(cc->id, strlen(id) + 2, "%s_", id);
sfprintf(disc->text, "\n");
- dtwalk(expr->symbols, global, cc);
+ dtwalk(expr->symbols, global, disc->text);
}
return cc;
}