[PATCH v4 1/3] libcrypt: make crypt() itself more modular
vapier at gentoo.org
Tue Dec 20 22:34:50 UTC 2011
On Tuesday 20 December 2011 02:18:17 William Pitcock wrote:
> On Mon, Dec 19, 2011 at 1:30 PM, Bernhard Reutner-Fischer wrote:
> > Would be perfect with a func impl, most likely.
> I agree that the macro approach is suboptimal for both type-safety
> reasons and expansion issues, however, Ulrich's implementation uses an
> inline function which is unsafe, and the macro version of the code
> would need some reworking to work as a standalone function.
having it be a macro or a static inline would largely get you the same result.
it'd have to be a static non-inline func, and leave it up to gcc to calculate
when to inline and when to make func calls.
> This also
> raises the question of what to do with the function -- should we just
> make an internal file for libcrypt for utility functions or just have
> them as static inlined functions inside the code?
it depends on what the func does. if it's only useful to libcrypt, then it
should stay in libcrypt as a hidden func.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: This is a digitally signed message part.
More information about the uClibc