Download unify/third_party/lua/src/llimits.h from Snapkitty/repoverse: direct link, hf CLI and curl.
- Browser
- Download file 9.29 kB
-
https://huggingface.co/Snapkitty/repoverse/resolve/main/unify/third_party/lua/src/llimits.h
- Command line
-
hf download hf://Snapkitty/repoverse/unify/third_party/lua/src/llimits.h
-
curl -L -o llimits.h https://huggingface.co/Snapkitty/repoverse/resolve/main/unify/third_party/lua/src/llimits.h
9.29 kB
| /* | |
| ** $Id: llimits.h $ | |
| ** Limits, basic types, and some other 'installation-dependent' definitions | |
| ** See Copyright Notice in lua.h | |
| */ | |
| /* | |
| ** 'lu_mem' and 'l_mem' are unsigned/signed integers big enough to count | |
| ** the total memory used by Lua (in bytes). Usually, 'size_t' and | |
| ** 'ptrdiff_t' should work, but we use 'long' for 16-bit machines. | |
| */ | |
| typedef LUAI_UMEM lu_mem; | |
| typedef LUAI_MEM l_mem; | |
| typedef size_t lu_mem; | |
| typedef ptrdiff_t l_mem; | |
| typedef unsigned long lu_mem; | |
| typedef long l_mem; | |
| /* chars used as small naturals (so that 'char' is reserved for characters) */ | |
| typedef unsigned char lu_byte; | |
| typedef signed char ls_byte; | |
| /* maximum value for size_t */ | |
| /* maximum size visible for Lua (must be representable in a lua_Integer) */ | |
| /* | |
| ** floor of the log2 of the maximum signed value for integral type 't'. | |
| ** (That is, maximum 'n' such that '2^n' fits in the given signed type.) | |
| */ | |
| /* | |
| ** test whether an unsigned value is a power of 2 (or zero) | |
| */ | |
| /* number of chars of a literal string without the ending \0 */ | |
| /* | |
| ** conversion of pointer to unsigned integer: this is for hashing only; | |
| ** there is no problem if the integer cannot hold the whole pointer | |
| ** value. (In strict ISO C this may cause undefined behavior, but no | |
| ** actual machine seems to bother.) | |
| */ | |
| /* types of 'usual argument conversions' for lua_Number and lua_Integer */ | |
| typedef LUAI_UACNUMBER l_uacNumber; | |
| typedef LUAI_UACINT l_uacInt; | |
| /* | |
| ** Internal assertions for in-house debugging | |
| */ | |
| /* to avoid problems with conditions too long */ | |
| /* | |
| ** assertion for checking API calls | |
| */ | |
| /* macro to avoid warnings about unused variables */ | |
| /* type casts (a macro highlights casts in the code) */ | |
| /* cast a signed lua_Integer to lua_Unsigned */ | |
| /* | |
| ** cast a lua_Unsigned to a signed lua_Integer; this cast is | |
| ** not strict ISO C, but two-complement architectures should | |
| ** work fine. | |
| */ | |
| /* | |
| ** non-return type | |
| */ | |
| /* | |
| ** Inline functions | |
| */ | |
| /* | |
| ** type for virtual-machine instructions; | |
| ** must be an unsigned with (at least) 4 bytes (see details in lopcodes.h) | |
| */ | |
| typedef unsigned int l_uint32; | |
| typedef unsigned long l_uint32; | |
| typedef l_uint32 Instruction; | |
| /* | |
| ** Maximum length for short strings, that is, strings that are | |
| ** internalized. (Cannot be smaller than reserved words or tags for | |
| ** metamethods, as these strings must be internalized; | |
| ** #("function") = 8, #("__newindex") = 10.) | |
| */ | |
| /* | |
| ** Initial size for the string table (must be power of 2). | |
| ** The Lua core alone registers ~50 strings (reserved words + | |
| ** metaevent keys + a few others). Libraries would typically add | |
| ** a few dozens more. | |
| */ | |
| /* | |
| ** Size of cache for strings in the API. 'N' is the number of | |
| ** sets (better be a prime) and "M" is the size of each set (M == 1 | |
| ** makes a direct cache.) | |
| */ | |
| /* minimum size for string buffer */ | |
| /* | |
| ** Maximum depth for nested C calls, syntactical nested non-terminals, | |
| ** and other features implemented through recursion in C. (Value must | |
| ** fit in a 16-bit unsigned integer. It must also be compatible with | |
| ** the size of the C stack.) | |
| */ | |
| /* | |
| ** macros that are executed whenever program enters the Lua core | |
| ** ('lua_lock') and leaves the core ('lua_unlock') | |
| */ | |
| /* | |
| ** macro executed during Lua functions at points where the | |
| ** function can yield. | |
| */ | |
| /* | |
| ** these macros allow user-specific actions when a thread is | |
| ** created/deleted/resumed/yielded. | |
| */ | |
| /* | |
| ** The luai_num* macros define the primitive operations over numbers. | |
| */ | |
| /* floor division (defined as 'floor(a/b)') */ | |
| /* float division */ | |
| /* | |
| ** modulo: defined as 'a - floor(a/b)*b'; the direct computation | |
| ** using this definition has several problems with rounding errors, | |
| ** so it is better to use 'fmod'. 'fmod' gives the result of | |
| ** 'a - trunc(a/b)*b', and therefore must be corrected when | |
| ** 'trunc(a/b) ~= floor(a/b)'. That happens when the division has a | |
| ** non-integer negative result: non-integer result is equivalent to | |
| ** a non-zero remainder 'm'; negative result is equivalent to 'a' and | |
| ** 'b' with different signs, or 'm' and 'b' with different signs | |
| ** (as the result 'm' of 'fmod' has the same sign of 'a'). | |
| */ | |
| /* exponentiation */ | |
| /* the others are quite standard operations */ | |
| /* | |
| ** macro to control inclusion of some hard tests on stack reallocation | |
| */ | |
| /* realloc stack keeping its size */ | |