From: Horst von Brand <vonbrand@inf.utfsm.cl>
To: Andries.Brouwer@cwi.nl
Cc: linux-kernel@vger.kernel.org
Subject: Re: Add identify decoding 4/4
Date: 07 Aug 2003 18:11:03 -0400 [thread overview]
Message-ID: <m1n0eljeyw.fsf@pincoya.inf.utfsm.cl> (raw)
In-Reply-To: <UTC200308062144.h76LiLm16781.aeb@smtp.cwi.nl>
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
next prev parent reply other threads:[~2003-08-07 22:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-06 21:44 Add identify decoding 4/4 Andries.Brouwer
2003-08-07 22:11 ` Horst von Brand [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-08-06 13:51 Andries.Brouwer
2003-08-06 21:25 ` Jeff Garzik
2003-08-06 7:23 Andries.Brouwer
2003-08-06 12:19 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1n0eljeyw.fsf@pincoya.inf.utfsm.cl \
--to=vonbrand@inf.utfsm.cl \
--cc=Andries.Brouwer@cwi.nl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).