aboutsummaryrefslogtreecommitdiff
path: root/llimits.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2021-09-15 11:18:41 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2021-09-15 11:18:41 -0300
commit2ff34717227b8046b0fdcb96206f11f5e888664e (patch)
tree112f054406eaa82363716882b4300d4ff98ab2ef /llimits.h
parent9db4bfed6bb9d5828c99c0f24749eedf54d70cc2 (diff)
downloadlua-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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/llimits.h b/llimits.h
index 025f1c82..6c56ba5a 100644
--- a/llimits.h
+++ b/llimits.h
@@ -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*/