Skip to content
Commit db2367e8 authored by Allison Karlitskaya's avatar Allison Karlitskaya
Browse files

GLib: clean up the "inline" mess once and for all

It's been a long time since we've been unconditionally saying "static
inline" in GLib headers without complaints so it's safe to assume that
all compilers that we care about support this.

One thing that is not yet totally supported is the unadorned use of the
word "inline".  Depending on the flags (-std=c89, for example), even GCC
will complain about this.  Detect missing C99 support and define
"inline" to "__inline" in that case.  Some research shows "__inline"
appears to be the most widely-supported keyword here, but we may need to
tweak this if we get some reports of breakage.

Clean up all of the configure checks around this and define G_CAN_INLINE
unconditionally.  Unfortunately, we must assume that some people are
still using G_IMPLEMENT_INLINES, we must continue to implement that
(including undefining G_CAN_INLINE and redefining G_INLINE_FUNC) if
requested.

It is not our intent to break existing users of the old-style
G_INLINE_FUNC approach and if...
parent 9834f792
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment