-
Thomas Haller authored
It's just more convenient, as it allows better chaining. Also, allow passing %NULL as @out buffer. It's clear how large the output buffer must be, so for convenience let the function (optionally) allocate a new buffer. This behavior of whether to - take @out, fill it, and return @out - take no @out, allocate new buffer, fill and and return it is slightly error prone. But it was already error prone before, when it would accept an input buffer without explicit buffer length. I think this makes it more safe, because in the common case the caller can avoid pre-allocating a buffer of the right size and the function gets it right.
21df8d38