mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
Before this commit, you could either use the inlinable function by using the macro or have the externally-linked version by first undefining the macro and then using the function. This commit makes all the ctype functions both inlinable and have external linkage at the same time. To pull this trick, we provide inlinable definitions in ctype.h and use a dedicated C feature that forces the symbol to be emitted in the TU of ctype.c. This could also have been achieved by using some #ifdef to hide the inline definition in ctype.h so a C++ compiler would still emit a normal symbol for the functions in ctype.cpp.