[speex-dev] patch for libspeex

Conrad Parker conrad at vergenet.net
Tue Dec 17 21:55:49 PST 2002



On Mon, Dec 16, 2002 at 08:16:05AM +0800, Bernard Blackham wrote:
> On Sun, Dec 15, 2002 at 02:15:51PM -0500, Jean-Marc Valin wrote:
> > I thought that -O3 would inline those functions, but I'll have a closer
> > look... I'm not sure how C inlining works. Does the inlined function
> > need to be in a .h?
> 
> I believe either the .h or the .c or both (both for consistency). It
> does seem an obvious optimisation for gcc to do though. Maybe
> because its in a different source file perhaps? No idea.

a function can only be inlined if gcc sees its source -- this can't
happen for C code if the function only exists in a different .o file.

if you want to make an inline function available to multiple source
files portably, put it in a .h and declare it static __inline__.

you can control the behaviour of inlining by combining it with other
keywords, but for C99 you're limited to static; for a good time read:

    http://gcc.gnu.org/onlinedocs/gcc/Inline.html

>  Australian Linux Technical Conference 2003: http://www.linux.conf.au/

oath, see you there :)

Conrad.
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Speex-dev mailing list