The first version would be consistent myth my usual style, but version 2.2 looks too sweet to resist.
Name:
Anonymous2010-04-12 4:47
I can't tell who's trolling who. Where does one place an inline function if not in a header file?
And static inline is necessary because gnu99 differs from c99 which also differs from c++ in the behaviour of bare inline. In gnu99, bare inline emits a non-inline function definition. In c99 it does not. In c++ it emits a static function definition.
Instead of trying to preproc all this bullshit, it's better to simply mark it static, and just don't take the address of an inline function. Most linkers are able to merge these definitions anyway (c++ linkers generally have to in order to avoid generating gigantic executables).