On Mon, Nov 18, 2013 at 09:24:00AM -0800, Keith Packard wrote: > Thierry Reding <[email protected]> writes: > > > If you absolutely must be able to use either statically or dynamically > > allocated strings in the same data structure, why not just go and > > strdup() string constants so that you can treat the structure in the > > same way subsequently? > > 1) That's not how the code works today, and these additional > allocations will result in memory leaks unless we carefully > review all code paths to ensure that they get freed.
I know. And I can understand that there's little incentive to do this "properly" retroactively. It's still unfortunate, though. > 2) It's a waste of CPU and memory. Well, I guess that depends on how you look at it. Anyway, you obviously have your reasons why you want to do this and you've been working on this code for a long time and know the implications much better. Besides it's not like this fundamentally changes the behaviour, it just makes sure that the warnings don't distract from more important ones. Thierry
pgpVlb76RZXb1.pgp
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
