# lua/llimits.h File Reference

`#include <limits.h>`
`#include <stddef.h>`
`#include "lua.h"`

Include dependency graph for llimits.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

union | L_Umaxalign

## Defines

#define | MAX_SIZET ((size_t)(~(size_t)0)-2)
#define | MAX_LUMEM ((lu_mem)(~(lu_mem)0)-2)
#define | MAX_INT (INT_MAX-2)
#define | IntPoint(p) ((unsigned int)(lu_mem)(p))
#define | lua_assert(c) ((void)0)
#define | check_exp(c, e) (e)
#define | api_check luai_apicheck
#define | UNUSED(x) ((void)(x))
#define | cast(t, exp) ((t)(exp))
#define | cast_byte(i) cast(lu_byte, (i))
#define | cast_num(i) cast(lua_Number, (i))
#define | cast_int(i) cast(int, (i))
#define | MAXSTACK 250
#define | MINSTRTABSIZE 32
#define | LUA_MINBUFFER 32
#define | lua_lock(L) ((void) 0)
#define | lua_unlock(L) ((void) 0)
#define | luai_threadyield(L) {lua_unlock(L); lua_lock(L);}
#define | condhardstacktests(x) ((void)0)

## Typedefs

typedef unsigned long | lu_int32
typedef unsigned long | lu_mem
typedef long | l_mem
typedef unsigned char | lu_byte
typedef double | l_uacNumber
typedef lu_int32 | Instruction

## Define Documentation

#define api_check luai_apicheck

Definition at line 64 of file llimits.h.

Referenced by index2adr(), lua_next(), lua_rawget(), lua_rawgeti(), lua_rawset(), lua_rawseti(), lua_replace(), lua_setfenv(), lua_setmetatable(), lua_settop(), and lua_xmove().

#define cast | ( | t,
|  | exp |  | ) | ((t)(exp))

Definition at line 75 of file llimits.h.

Referenced by checkSizes(), f_call(), f_Ccall(), f_parser(), index2adr(), lua_gc(), luaF_newCclosure(), luaF_newLclosure(), luaH_getnum(), luaH_new(), luaH_set(), luaH_setnum(), luaH_setstr(), luaK_setlist(), luaO_pushvfstring(), luaO_str2d(), luaS_newlstr(), luaS_newudata(), luaX_token2str(), new_localvar(), newlstr(), resume(), save(), setnodevector(), and unbound_search().

#define cast_byte | ( | i |  | ) | cast(lu_byte, (i))

Definition at line 78 of file llimits.h.

Referenced by adjustlocalvars(), atomic(), indexupvalue(), lua_resume(), lua_sethook(), luaD_throw(), luaF_newCclosure(), luaF_newLclosure(), luaH_new(), luaK_checkstack(), luaT_gettm(), luaX_init(), parlist(), setnodevector(), and traversetable().

#define cast_int | ( | i |  | ) | cast(int, (i))

Definition at line 80 of file llimits.h.

Referenced by addk(), checkstacksizes(), findindex(), lua_concat(), lua_gc(), lua_getstack(), lua_gettop(), luaD_callhook(), luaD_precall(), luaG_typeerror(), luaO_int2fb(), luaO_pushvfstring(), luaS_resize(), luaV_execute(), restore_stack_limit(), and resume().

#define cast_num | ( | i |  | ) | cast(lua_Number, (i))

Definition at line 79 of file llimits.h.

Referenced by addk(), adjust_varargs(), arrayindex(), lua_pushinteger(), luaH_get(), luaH_getnum(), luaH_next(), luaH_setnum(), luaO_pushvfstring(), luaO_str2d(), and luaV_execute().

#define check_exp | ( | c,
|  | e |  | ) | (e)

Definition at line 63 of file llimits.h.

#define condhardstacktests | ( | x |  | ) | ((void)0)

Definition at line 123 of file llimits.h.

Referenced by checkstacksizes().

#define IntPoint | ( | p |  | ) | ((unsigned int)(lu_mem)(p))

Definition at line 42 of file llimits.h.

#define lua_assert | ( | c |  | ) | ((void)0)

Definition at line 62 of file llimits.h.

Referenced by addk(), adjust_varargs(), Arith(), atomic(), block(), chunk(), cleartable(), close_func(), close_state(), codenot(), computesizes(), constfolding(), constructor(), discharge2reg(), DumpConstants(), enterblock(), fixjump(), freeobj(), freereg(), funcargs(), getobjname(), inclinenumber(), indexupvalue(), invertjump(), leaveblock(), llex(), lua_close(), lua_getinfo(), lua_pushcclosure(), lua_resume(), luaC_barrierback(), luaC_barrierf(), luaC_fullgc(), luaC_linkupval(), luaC_step(), luaD_callhook(), luaD_precall(), luaD_reallocstack(), luaE_freethread(), luaE_newthread(), luaF_close(), luaF_findupval(), luaG_concaterror(), luaK_codeABC(), luaK_codeABx(), luaK_patchlist(), luaK_posfix(), luaK_prefix(), luaK_setlist(), luaK_storevar(), luaM_realloc_(), luaO_rawequalObj(), luaS_resize(), luaT_gettm(), luaV_equalval(), luaV_execute(), luaX_init(), luaX_lookahead(), luaX_token2str(), luaY_parser(), newkey(), precheck(), propagatemark(), read_numeral(), reallymarkobject(), remarkupvals(), removeentry(), restore_stack_limit(), resume(), retstat(), singlestep(), skip_sep(), sweeplist(), traverseclosure(), traversestack(), traversetable(), and unlinkupval().

#define lua_lock | ( | L |  | ) | ((void) 0)

Definition at line 110 of file llimits.h.

Referenced by DumpBlock(), lua_atpanic(), lua_call(), lua_checkstack(), lua_close(), lua_concat(), lua_cpcall(), lua_createtable(), lua_dump(), lua_equal(), lua_error(), lua_gc(), lua_getallocf(), lua_getfenv(), lua_getfield(), lua_getinfo(), lua_getlocal(), lua_getmetatable(), lua_getstack(), lua_gettable(), lua_getupvalue(), lua_insert(), lua_lessthan(), lua_load(), lua_newthread(), lua_newuserdata(), lua_next(), lua_objlen(), lua_pcall(), lua_pushboolean(), lua_pushcclosure(), lua_pushfstring(), lua_pushinteger(), lua_pushlightuserdata(), lua_pushlstring(), lua_pushnil(), lua_pushnumber(), lua_pushthread(), lua_pushvalue(), lua_pushvfstring(), lua_rawget(), lua_rawgeti(), lua_rawset(), lua_rawseti(), lua_remove(), lua_replace(), lua_resume(), lua_setallocf(), lua_setfenv(), lua_setfield(), lua_setlocal(), lua_setmetatable(), lua_settable(), lua_settop(), lua_setupvalue(), lua_tolstring(), lua_xmove(), lua_yield(), luaD_callhook(), luaD_precall(), and luaZ_fill().

#define LUA_MINBUFFER 32

Definition at line 105 of file llimits.h.

Referenced by checkSizes(), luaX_setinput(), and luaZ_openspace().

#define lua_unlock | ( | L |  | ) | ((void) 0)

Definition at line 111 of file llimits.h.

Referenced by DumpBlock(), lua_atpanic(), lua_call(), lua_checkstack(), lua_concat(), lua_cpcall(), lua_createtable(), lua_dump(), lua_equal(), lua_error(), lua_gc(), lua_getallocf(), lua_getfenv(), lua_getfield(), lua_getinfo(), lua_getlocal(), lua_getmetatable(), lua_getstack(), lua_gettable(), lua_getupvalue(), lua_insert(), lua_lessthan(), lua_load(), lua_newthread(), lua_newuserdata(), lua_next(), lua_objlen(), lua_pcall(), lua_pushboolean(), lua_pushcclosure(), lua_pushfstring(), lua_pushinteger(), lua_pushlightuserdata(), lua_pushlstring(), lua_pushnil(), lua_pushnumber(), lua_pushthread(), lua_pushvalue(), lua_pushvfstring(), lua_rawget(), lua_rawgeti(), lua_rawset(), lua_rawseti(), lua_remove(), lua_replace(), lua_resume(), lua_setallocf(), lua_setfenv(), lua_setfield(), lua_setlocal(), lua_setmetatable(), lua_settable(), lua_settop(), lua_setupvalue(), lua_tolstring(), lua_xmove(), lua_yield(), luaD_callhook(), luaD_precall(), luaD_throw(), luaZ_fill(), and resume_error().

#define luai_threadyield | ( | L |  | ) | {lua_unlock(L); lua_lock(L);}

Definition at line 115 of file llimits.h.

#define MAX_INT (INT_MAX-2)

Definition at line 35 of file llimits.h.

Referenced by inclinenumber(), indexupvalue(), listfield(), luaK_code(), newlstr(), recfield(), and unbound_search().

#define MAX_LUMEM ((lu_mem)(~(lu_mem)0)-2)

Definition at line 32 of file llimits.h.

Referenced by lua_gc(), and luaC_step().

#define MAX_SIZET ((size_t)(~(size_t)0)-2)

Definition at line 30 of file llimits.h.

Referenced by luaS_newudata(), luaV_concat(), newlstr(), and save().

#define MAXSTACK 250

Definition at line 93 of file llimits.h.

Referenced by luaK_checkstack(), and precheck().

#define MINSTRTABSIZE 32

Definition at line 99 of file llimits.h.

Referenced by checkSizes(), and f_luaopen().

#define UNUSED | ( | x |  | ) | ((void)(x))

Definition at line 70 of file llimits.h.

Referenced by callallgcTM(), f_luaopen(), and lua_typename().

## Typedef Documentation

typedef lu_int32 Instruction

Definition at line 88 of file llimits.h.

typedef long l_mem

Definition at line 22 of file llimits.h.

typedef double l_uacNumber

Definition at line 51 of file llimits.h.

typedef unsigned char lu_byte

Definition at line 27 of file llimits.h.

typedef unsigned long lu_int32

Definition at line 18 of file llimits.h.

typedef unsigned long lu_mem

Definition at line 20 of file llimits.h.