avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] crc16.h - why inlined


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] crc16.h - why inlined
Date: Mon, 13 Jan 2003 13:05:30 +0100 (MET)

Volkmar Dierkes <address@hidden> wrote:

> But that was not the reason for my initial post. I only wanted to
> ask if it is better to change the inlined function of the available
> header-file to a not inlined function.

I tend to an approach that is similar to e. g. getc() (and all the
macros the C standard calls "function-like macros"): the header file
provides a prototype for a non-inlined function, and the library
contains this function within an object module.  Then, the header file
contains another inlined function, and a #define that makes this
inlined function available under the same name as the non-inlined one.
If someone wants to use the library version instead of the inlined
version, he can then #undef the name.

Of course, the usage of all this needs to be documented.

Does this sound reasonable to everyone?

-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/
avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]