[PATCH] misc: Add mkostempat (BZ 19866)

Paul Eggert eggert@cs.ucla.edu
Tue Jun 23 21:09:11 GMT 2026


On 2026-06-23 12:28, Adhemerval Zanella Netto wrote:
> I tend to agree with Florian that
> mutate input is a footgun that we should avoid.

Calling malloc is also a footgun - perhaps even a bigger one.

The function could have two args of the same size, one for the template 
and one for the result. Though I expect most apps would rather have the 
simpler API, mutable array and all.

If you have a template arg, the "prefix", "suffix", and "n_random" args 
all become redundant. So it's simpler to have a template. Plus, people 
are used to templates.


More information about the Libc-alpha mailing list