Thread (6 messages) flat view 6 messages, 4 authors, 2016-06-15

Re: [PATCH] git-compat-util: Avoid strcasecmp() being inlined

From: Sebastian Schuberth <hidden>
Date: 2016-06-15 22:58:51

Possibly related (same subject, not in this thread)

On 12.09.2013 23:31, Jonathan Nieder wrote:
quoted
And that's exactly what defining __NO_INLINE__ does. Granted, defining
__NO_INLINE__ in the scope of string.h will also add a "#define
strcasecmp _stricmp"; but despite it's name, defining __NO_INLINE__
does not imply a performance hit due to functions not being inlined
because it's just the "strncasecmp" wrapper around "_strnicmp" that's
being inlined, not "_strnicmp" itself.
What I don't understand is why the header doesn't use "static inline"
instead of "extern inline".  The former would seem to be better in
every way for this particular use case.

See also <http://www.greenend.org.uk/rjk/tech/inline.html>, section
"GNU C inline rules".
I've suggested this at [1] now to see if such a patch is likely to be 
accepted.

[1] http://article.gmane.org/gmane.comp.gnu.mingw.user/42993

-- 
Sebastian Schuberth
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help