4.8 – Functions and Types[-o, +p, x]

Here we list all functions and types from the C API in alphabetical order. Each function has an indicator like this:

The first field, o, is how many elements the function pops from the stack. The second field, p, is how many elements the function pushes onto the stack. (Any function always pushes its results after popping its arguments.) A field in the form x|y means the function can push (or pop) x or y elements, depending on the situation; an interrogation mark '?' means that we cannot know how many elements the function pops/pushes by looking only at its arguments (e.g., they may depend on what is on the stack). The third field, x, tells whether the function may raise errors: '-' means the function never raises any error; 'm' means the function may raise out-of-memory errors and errors running a __gc metamethod; 'e' means the function may raise any errors (it can run arbitrary Lua code, either directly or through metamethods); 'v' means the function may raise an error on purpose.

lua_isnil
  • References/Lua/Lua/API/Functions and Types

lua_isnil[-0, +0, –] int lua_isnil (lua_State *L, int index); Returns 1 if the value at the given index

2025-01-10 15:47:30
lua_rawgeti
  • References/Lua/Lua/API/Functions and Types

lua_rawgeti[-0, +1, –] int lua_rawgeti (lua_State *L, int index, lua_Integer n); Pushes onto the stack

2025-01-10 15:47:30
lua_isnoneornil
  • References/Lua/Lua/API/Functions and Types

lua_isnoneornil[-0, +0, –] int lua_isnoneornil (lua_State *L, int index); Returns 1 if the given index

2025-01-10 15:47:30
lua_xmove
  • References/Lua/Lua/API/Functions and Types

lua_xmove[-?, +?, –] void lua_xmove (lua_State *from, lua_State *to, int n); Exchange values between different

2025-01-10 15:47:30
lua_islightuserdata
  • References/Lua/Lua/API/Functions and Types

lua_islightuserdata[-0, +0, –] int lua_islightuserdata (lua_State *L, int index); Returns 1 if the value

2025-01-10 15:47:30
lua_Reader
  • References/Lua/Lua/API/Functions and Types

lua_Reader typedef const char * (*lua_Reader) (lua_State *L, void *data,

2025-01-10 15:47:30
lua_dump
  • References/Lua/Lua/API/Functions and Types

lua_dump[-0, +0, –] int lua_dump (lua_State *L, lua_Writer writer,

2025-01-10 15:47:30
lua_touserdata
  • References/Lua/Lua/API/Functions and Types

lua_touserdata[-0, +0, –] void *lua_touserdata (lua_State *L, int index); If the value at the given index

2025-01-10 15:47:30
lua_isfunction
  • References/Lua/Lua/API/Functions and Types

lua_isfunction[-0, +0, –] int lua_isfunction (lua_State *L, int index); Returns 1 if the value at the given

2025-01-10 15:47:30
lua_pushcclosure
  • References/Lua/Lua/API/Functions and Types

lua_pushcclosure[-n, +1, m] void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n); Pushes

2025-01-10 15:47:30