From 2ff34717227b8046b0fdcb96206f11f5e888664e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 15 Sep 2021 11:18:41 -0300 Subject: Using 'inline' in some functions According to ISO C, "making a function an inline function suggests that calls to the function be as fast as possible." (Not available in C89.) --- llimits.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'llimits.h') diff --git a/llimits.h b/llimits.h index 025f1c82..6c56ba5a 100644 --- a/llimits.h +++ b/llimits.h @@ -165,6 +165,20 @@ typedef LUAI_UACINT l_uacInt; #endif +/* +** Inline functions +*/ +#if !defined(LUA_USE_C89) +#define l_inline inline +#elif defined(__GNUC__) +#define l_inline __inline__ +#else +#define l_inline /* empty */ +#endif + +#define l_sinline static l_inline + + /* ** type for virtual-machine instructions; ** must be an unsigned with (at least) 4 bytes (see details in lopcodes.h) -- cgit v1.2.3-55-g6feb