aboutsummaryrefslogtreecommitdiff
path: root/llimits.h
diff options
context:
space:
mode:
Diffstat (limited to 'llimits.h')
-rw-r--r--llimits.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/llimits.h b/llimits.h
index febf7555..950e7e64 100644
--- a/llimits.h
+++ b/llimits.h
@@ -14,6 +14,11 @@
14 14
15#include "lua.h" 15#include "lua.h"
16 16
17
18/* minimum number of bits in an integer */
19#define LUAI_BITSINT (LUAI_IS32INT ? 32 : 16)
20
21
17/* 22/*
18** 'lu_mem' and 'l_mem' are unsigned/signed integers big enough to count 23** 'lu_mem' and 'l_mem' are unsigned/signed integers big enough to count
19** the total memory used by Lua (in bytes). Usually, 'size_t' and 24** the total memory used by Lua (in bytes). Usually, 'size_t' and
@@ -22,7 +27,7 @@
22#if defined(LUAI_MEM) /* { external definitions? */ 27#if defined(LUAI_MEM) /* { external definitions? */
23typedef LUAI_UMEM lu_mem; 28typedef LUAI_UMEM lu_mem;
24typedef LUAI_MEM l_mem; 29typedef LUAI_MEM l_mem;
25#elif LUAI_BITSINT >= 32 /* }{ */ 30#elif LUAI_IS32INT /* }{ */
26typedef size_t lu_mem; 31typedef size_t lu_mem;
27typedef ptrdiff_t l_mem; 32typedef ptrdiff_t l_mem;
28#else /* 16-bit ints */ /* }{ */ 33#else /* 16-bit ints */ /* }{ */
@@ -172,13 +177,11 @@ typedef LUAI_UACINT l_uacInt;
172#endif 177#endif
173 178
174 179
175
176
177/* 180/*
178** type for virtual-machine instructions; 181** type for virtual-machine instructions;
179** must be an unsigned with (at least) 4 bytes (see details in lopcodes.h) 182** must be an unsigned with (at least) 4 bytes (see details in lopcodes.h)
180*/ 183*/
181#if LUAI_BITSINT >= 32 184#if LUAI_IS32INT
182typedef unsigned int l_uint32; 185typedef unsigned int l_uint32;
183#else 186#else
184typedef unsigned long l_uint32; 187typedef unsigned long l_uint32;