[vlc-devel] Re: vlc: svn commit r17986 (md)

Clément Stenac zorglub at diwi.org
Fri Nov 24 10:54:57 CET 2006

> instead of dynamically sized arrays. And by the way, if you want C89, 
> you ought to remove all the static inlines. That's not standard either 
> (let alone C99 that is).

Now, stop trying to look stupid (I'll let you choose whether you
consider this as an insult). We don't "want C89", we don't really care
about standard, but about what the compilers of our target platforms

Apparently, the only really problematic platform is BeOS which is stuck
forever with gcc 2.95

The biggest problem that we have here is dynamically-sized stack arrays
(and maybe also the restrict keyword). The other niceties of C99 are not 
"that" important (I mean, putting the variables at the top is not that
hard, and if you really don't want, you can just enclose the snippet in
a block).

For arrays, the fact is that we lived without them for a while... I know
you'll reply that it's not an excuse and that we should try to do
better. It would be nice to have a clear overview of where we perform
heavy mallocing that could be done on the stack, and how we can solve

- If there are just a few instances, it could be possible to ifdef code
  for gcc-2.95 and other non-C99 compilers
- For values that are always small (I guess we have some of these in the 
  network code), we could just alloc on the stack the maximum size
- Memory pools...?

Clément Stenac

This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html

More information about the vlc-devel mailing list