lkml.org 
[lkml]   [2003]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Add identify decoding 4/4
From
Date
Andries.Brouwer@cwi.nl writes:
> > I know full well _why_ the big function is in the header;
> > that doesn't address my point: we don't need to be putting
> > big functions in header files. That's why libraries were invented
>
> Well. I chose the most elegant solution I saw.
>
> If you see a better solution, I would like to see it.
> Note that local symbols in several files determine
> whether this function should be compiled or not.

Then the proposed solution won't work either...

Just do an xyz.h:

#ifdef NEED_BIG_UGLY_FUNC
/* Prototype, gets pulled in when called */
void big_ugly_func(int this, void *that);
#else
/* Inline definition, gets nuked */
static inline void big_ugly_func(int this, void *that) {}
#endif

while xyz.c goes into a library (*.a) with the full definition. Gets
compiled, but not linked in.

What is wrong with that?
--
Dr. Horst H. von Brand User #22616 counter.li.org
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.059 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site