diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2021-09-15 11:18:41 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2021-09-15 11:18:41 -0300 |
commit | 2ff34717227b8046b0fdcb96206f11f5e888664e (patch) | |
tree | 112f054406eaa82363716882b4300d4ff98ab2ef /llimits.h | |
parent | 9db4bfed6bb9d5828c99c0f24749eedf54d70cc2 (diff) | |
download | lua-2ff34717227b8046b0fdcb96206f11f5e888664e.tar.gz lua-2ff34717227b8046b0fdcb96206f11f5e888664e.tar.bz2 lua-2ff34717227b8046b0fdcb96206f11f5e888664e.zip |
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.)
Diffstat (limited to 'llimits.h')
-rw-r--r-- | llimits.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -166,6 +166,20 @@ typedef LUAI_UACINT l_uacInt; | |||
166 | 166 | ||
167 | 167 | ||
168 | /* | 168 | /* |
169 | ** Inline functions | ||
170 | */ | ||
171 | #if !defined(LUA_USE_C89) | ||
172 | #define l_inline inline | ||
173 | #elif defined(__GNUC__) | ||
174 | #define l_inline __inline__ | ||
175 | #else | ||
176 | #define l_inline /* empty */ | ||
177 | #endif | ||
178 | |||
179 | #define l_sinline static l_inline | ||
180 | |||
181 | |||
182 | /* | ||
169 | ** type for virtual-machine instructions; | 183 | ** type for virtual-machine instructions; |
170 | ** must be an unsigned with (at least) 4 bytes (see details in lopcodes.h) | 184 | ** must be an unsigned with (at least) 4 bytes (see details in lopcodes.h) |
171 | */ | 185 | */ |