On Wed, Apr 01, 2020 at 12:00:09PM +0200, Karel Zak wrote: > On Wed, Apr 01, 2020 at 06:34:06AM -0300, Peter Cordes wrote: > > Or can we put the wrapper function in a .h so it can inline away? > > That would bake the choice into applications that use libuuid, so you > > couldn't change it just by rebuilding libuuid. That's perhaps not > > desirable; if applications wanted to have that choice baked in they > > could have called the explicit upper or lower versions. > > Frankly, what we're trying to fix by the alias? It sounds like > premature optimization. The current solution works, maybe foo(bar()) > is also optimized by compiler. I have doubts that use inline function > in header or so makes a real sense. BTW, would be better to make uuid_fmt() as inline function as we use it in uuid_unparse_lower(), uuid_unparse_upper() and uuid_unparse()? Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com