Classes | Macros | Typedefs | Functions
lauxlib.h File Reference
#include <stddef.h>
#include <stdio.h>
#include "luaconf.h"
#include "lua.h"
Include dependency graph for lauxlib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  luaL_Buffer
 
struct  luaL_Reg
 
struct  luaL_Stream
 

Macros

#define lua_assert(c)   ((void)0)
 
#define LUA_ERRFILE   (LUA_ERRERR+1)
 
#define LUA_FILEHANDLE   "FILE*"
 
#define LUA_GNAME   "_G"
 
#define LUA_LOADED_TABLE   "_LOADED"
 
#define LUA_NOREF   (-2)
 
#define LUA_PRELOAD_TABLE   "_PRELOAD"
 
#define LUA_REFNIL   (-1)
 
#define lua_writeline()   (lua_writestring("\n", 1), fflush(stdout))
 
#define lua_writestring(s, l)   fwrite((s), sizeof(char), (l), stdout)
 
#define lua_writestringerror(s, p)   (fprintf(stderr, (s), (p)), fflush(stderr))
 
#define luaL_addchar(B, c)
 
#define luaL_addsize(B, s)   ((B)->n += (s))
 
#define luaL_argcheck(L, cond, arg, extramsg)   ((void)(luai_likely(cond) || luaL_argerror(L, (arg), (extramsg))))
 
#define luaL_argexpected(L, cond, arg, tname)   ((void)(luai_likely(cond) || luaL_typeerror(L, (arg), (tname))))
 
#define luaL_buffaddr(bf)   ((bf)->b)
 
#define luaL_bufflen(bf)   ((bf)->n)
 
#define luaL_buffsub(B, s)   ((B)->n -= (s))
 
#define luaL_checkstring(L, n)   (luaL_checklstring(L, (n), NULL))
 
#define luaL_checkversion(L)   luaL_checkversion_(L, LUA_VERSION_NUM, LUAL_NUMSIZES)
 
#define luaL_dofile(L, fn)   (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0))
 
#define luaL_dostring(L, s)   (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0))
 
#define luaL_getmetatable(L, n)   (lua_getfield(L, LUA_REGISTRYINDEX, (n)))
 
#define luaL_loadbuffer(L, s, sz, n)   luaL_loadbufferx(L,s,sz,n,NULL)
 
#define luaL_loadfile(L, f)   luaL_loadfilex(L,f,NULL)
 
#define luaL_newlib(L, l)   (luaL_checkversion(L), luaL_newlibtable(L,l), luaL_setfuncs(L,l,0))
 
#define luaL_newlibtable(L, l)   lua_createtable(L, 0, sizeof(l)/sizeof((l)[0]) - 1)
 
#define LUAL_NUMSIZES   (sizeof(lua_Integer)*16 + sizeof(lua_Number))
 
#define luaL_opt(L, f, n, d)   (lua_isnoneornil(L,(n)) ? (d) : f(L,(n)))
 
#define luaL_optstring(L, n, d)   (luaL_optlstring(L, (n), (d), NULL))
 
#define luaL_prepbuffer(B)   luaL_prepbuffsize(B, LUAL_BUFFERSIZE)
 
#define luaL_pushfail(L)   lua_pushnil(L)
 
#define luaL_typename(L, i)   lua_typename(L, lua_type(L,(i)))
 

Typedefs

typedef struct luaL_Buffer luaL_Buffer
 
typedef struct luaL_Reg luaL_Reg
 
typedef struct luaL_Stream luaL_Stream
 

Functions

LUALIB_API void luaL_addgsub (luaL_Buffer *b, const char *s, const char *p, const char *r)
 
LUALIB_API void() luaL_addlstring (luaL_Buffer *B, const char *s, size_t l)
 
LUALIB_API void() luaL_addstring (luaL_Buffer *B, const char *s)
 
LUALIB_API void() luaL_addvalue (luaL_Buffer *B)
 
LUALIB_API int() luaL_argerror (lua_State *L, int arg, const char *extramsg)
 
LUALIB_API void() luaL_buffinit (lua_State *L, luaL_Buffer *B)
 
LUALIB_API char *() luaL_buffinitsize (lua_State *L, luaL_Buffer *B, size_t sz)
 
LUALIB_API int() luaL_callmeta (lua_State *L, int obj, const char *e)
 
LUALIB_API void() luaL_checkany (lua_State *L, int arg)
 
LUALIB_API lua_Integer() luaL_checkinteger (lua_State *L, int arg)
 
const LUALIB_API char *() luaL_checklstring (lua_State *L, int arg, size_t *l)
 
LUALIB_API lua_Number() luaL_checknumber (lua_State *L, int arg)
 
LUALIB_API int() luaL_checkoption (lua_State *L, int arg, const char *def, const char *const lst[])
 
LUALIB_API void() luaL_checkstack (lua_State *L, int sz, const char *msg)
 
LUALIB_API void() luaL_checktype (lua_State *L, int arg, int t)
 
LUALIB_API void *() luaL_checkudata (lua_State *L, int ud, const char *tname)
 
LUALIB_API void() luaL_checkversion_ (lua_State *L, lua_Number ver, size_t sz)
 
LUALIB_API int() luaL_error (lua_State *L, const char *fmt,...)
 
LUALIB_API int() luaL_execresult (lua_State *L, int stat)
 
LUALIB_API int() luaL_fileresult (lua_State *L, int stat, const char *fname)
 
LUALIB_API int() luaL_getmetafield (lua_State *L, int obj, const char *e)
 
LUALIB_API int() luaL_getsubtable (lua_State *L, int idx, const char *fname)
 
const LUALIB_API char *() luaL_gsub (lua_State *L, const char *s, const char *p, const char *r)
 
LUALIB_API lua_Integer() luaL_len (lua_State *L, int idx)
 
LUALIB_API int() luaL_loadbufferx (lua_State *L, const char *buff, size_t sz, const char *name, const char *mode)
 
LUALIB_API int() luaL_loadfilex (lua_State *L, const char *filename, const char *mode)
 
LUALIB_API int() luaL_loadstring (lua_State *L, const char *s)
 
LUALIB_API int() luaL_newmetatable (lua_State *L, const char *tname)
 
LUALIB_API lua_State *() luaL_newstate (void)
 
LUALIB_API lua_Integer() luaL_optinteger (lua_State *L, int arg, lua_Integer def)
 
const LUALIB_API char *() luaL_optlstring (lua_State *L, int arg, const char *def, size_t *l)
 
LUALIB_API lua_Number() luaL_optnumber (lua_State *L, int arg, lua_Number def)
 
LUALIB_API char *() luaL_prepbuffsize (luaL_Buffer *B, size_t sz)
 
LUALIB_API void() luaL_pushresult (luaL_Buffer *B)
 
LUALIB_API void() luaL_pushresultsize (luaL_Buffer *B, size_t sz)
 
LUALIB_API int() luaL_ref (lua_State *L, int t)
 
LUALIB_API void() luaL_requiref (lua_State *L, const char *modname, lua_CFunction openf, int glb)
 
LUALIB_API void() luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup)
 
LUALIB_API void() luaL_setmetatable (lua_State *L, const char *tname)
 
LUALIB_API void *() luaL_testudata (lua_State *L, int ud, const char *tname)
 
const LUALIB_API char *() luaL_tolstring (lua_State *L, int idx, size_t *len)
 
LUALIB_API void() luaL_traceback (lua_State *L, lua_State *L1, const char *msg, int level)
 
LUALIB_API int() luaL_typeerror (lua_State *L, int arg, const char *tname)
 
LUALIB_API void() luaL_unref (lua_State *L, int t, int ref)
 
LUALIB_API void() luaL_where (lua_State *L, int lvl)
 

Macro Definition Documentation

◆ lua_assert

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

Definition at line 170 of file lauxlib.h.

◆ LUA_ERRFILE

#define LUA_ERRFILE   (LUA_ERRERR+1)

Definition at line 27 of file lauxlib.h.

◆ LUA_FILEHANDLE

#define LUA_FILEHANDLE   "FILE*"

Definition at line 234 of file lauxlib.h.

◆ LUA_GNAME

#define LUA_GNAME   "_G"

Definition at line 20 of file lauxlib.h.

◆ LUA_LOADED_TABLE

#define LUA_LOADED_TABLE   "_LOADED"

Definition at line 31 of file lauxlib.h.

◆ LUA_NOREF

#define LUA_NOREF   (-2)

Definition at line 86 of file lauxlib.h.

◆ LUA_PRELOAD_TABLE

#define LUA_PRELOAD_TABLE   "_PRELOAD"

Definition at line 35 of file lauxlib.h.

◆ LUA_REFNIL

#define LUA_REFNIL   (-1)

Definition at line 87 of file lauxlib.h.

◆ lua_writeline

#define lua_writeline ( )    (lua_writestring("\n", 1), fflush(stdout))

Definition at line 257 of file lauxlib.h.

◆ lua_writestring

#define lua_writestring (   s,
 
)    fwrite((s), sizeof(char), (l), stdout)

Definition at line 252 of file lauxlib.h.

◆ lua_writestringerror

#define lua_writestringerror (   s,
 
)    (fprintf(stderr, (s), (p)), fflush(stderr))

Definition at line 262 of file lauxlib.h.

◆ luaL_addchar

#define luaL_addchar (   B,
 
)
Value:
((void)((B)->n < (B)->size || luaL_prepbuffsize((B), 1)), \
((B)->b[(B)->n++] = (c)))

Definition at line 199 of file lauxlib.h.

◆ luaL_addsize

#define luaL_addsize (   B,
  s 
)    ((B)->n += (s))

Definition at line 203 of file lauxlib.h.

◆ luaL_argcheck

#define luaL_argcheck (   L,
  cond,
  arg,
  extramsg 
)    ((void)(luai_likely(cond) || luaL_argerror(L, (arg), (extramsg))))

Definition at line 133 of file lauxlib.h.

◆ luaL_argexpected

#define luaL_argexpected (   L,
  cond,
  arg,
  tname 
)    ((void)(luai_likely(cond) || luaL_typeerror(L, (arg), (tname))))

Definition at line 136 of file lauxlib.h.

◆ luaL_buffaddr

#define luaL_buffaddr (   bf)    ((bf)->b)

Definition at line 196 of file lauxlib.h.

◆ luaL_bufflen

#define luaL_bufflen (   bf)    ((bf)->n)

Definition at line 195 of file lauxlib.h.

◆ luaL_buffsub

#define luaL_buffsub (   B,
  s 
)    ((B)->n -= (s))

Definition at line 205 of file lauxlib.h.

◆ luaL_checkstring

#define luaL_checkstring (   L,
 
)    (luaL_checklstring(L, (n), NULL))

Definition at line 139 of file lauxlib.h.

◆ luaL_checkversion

#define luaL_checkversion (   L)    luaL_checkversion_(L, LUA_VERSION_NUM, LUAL_NUMSIZES)

Definition at line 47 of file lauxlib.h.

◆ luaL_dofile

#define luaL_dofile (   L,
  fn 
)    (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0))

Definition at line 144 of file lauxlib.h.

◆ luaL_dostring

#define luaL_dostring (   L,
  s 
)    (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0))

Definition at line 147 of file lauxlib.h.

◆ luaL_getmetatable

#define luaL_getmetatable (   L,
 
)    (lua_getfield(L, LUA_REGISTRYINDEX, (n)))

Definition at line 150 of file lauxlib.h.

◆ luaL_loadbuffer

#define luaL_loadbuffer (   L,
  s,
  sz,
 
)    luaL_loadbufferx(L,s,sz,n,NULL)

Definition at line 154 of file lauxlib.h.

◆ luaL_loadfile

#define luaL_loadfile (   L,
  f 
)    luaL_loadfilex(L,f,NULL)

Definition at line 95 of file lauxlib.h.

◆ luaL_newlib

#define luaL_newlib (   L,
 
)    (luaL_checkversion(L), luaL_newlibtable(L,l), luaL_setfuncs(L,l,0))

Definition at line 130 of file lauxlib.h.

◆ luaL_newlibtable

#define luaL_newlibtable (   L,
 
)    lua_createtable(L, 0, sizeof(l)/sizeof((l)[0]) - 1)

Definition at line 127 of file lauxlib.h.

◆ LUAL_NUMSIZES

#define LUAL_NUMSIZES   (sizeof(lua_Integer)*16 + sizeof(lua_Number))

Definition at line 44 of file lauxlib.h.

◆ luaL_opt

#define luaL_opt (   L,
  f,
  n,
  d 
)    (lua_isnoneornil(L,(n)) ? (d) : f(L,(n)))

Definition at line 152 of file lauxlib.h.

◆ luaL_optstring

#define luaL_optstring (   L,
  n,
  d 
)    (luaL_optlstring(L, (n), (d), NULL))

Definition at line 140 of file lauxlib.h.

◆ luaL_prepbuffer

#define luaL_prepbuffer (   B)    luaL_prepbuffsize(B, LUAL_BUFFERSIZE)

Definition at line 216 of file lauxlib.h.

◆ luaL_pushfail

#define luaL_pushfail (   L)    lua_pushnil(L)

Definition at line 158 of file lauxlib.h.

◆ luaL_typename

#define luaL_typename (   L,
 
)    lua_typename(L, lua_type(L,(i)))

Definition at line 142 of file lauxlib.h.

Typedef Documentation

◆ luaL_Buffer

typedef struct luaL_Buffer luaL_Buffer

Definition at line 23 of file lauxlib.h.

◆ luaL_Reg

typedef struct luaL_Reg luaL_Reg

◆ luaL_Stream

typedef struct luaL_Stream luaL_Stream

Function Documentation

◆ luaL_addgsub()

LUALIB_API void luaL_addgsub ( luaL_Buffer b,
const char *  s,
const char *  p,
const char *  r 
)

Definition at line 987 of file lauxlib.c.

◆ luaL_addlstring()

LUALIB_API void() luaL_addlstring ( luaL_Buffer B,
const char *  s,
size_t  l 
)

Definition at line 579 of file lauxlib.c.

◆ luaL_addstring()

LUALIB_API void() luaL_addstring ( luaL_Buffer B,
const char *  s 
)

Definition at line 588 of file lauxlib.c.

◆ luaL_addvalue()

LUALIB_API void() luaL_addvalue ( luaL_Buffer B)

Definition at line 618 of file lauxlib.c.

◆ luaL_argerror()

LUALIB_API int() luaL_argerror ( lua_State L,
int  arg,
const char *  extramsg 
)

Definition at line 175 of file lauxlib.c.

◆ luaL_buffinit()

LUALIB_API void() luaL_buffinit ( lua_State L,
luaL_Buffer B 
)

Definition at line 629 of file lauxlib.c.

◆ luaL_buffinitsize()

LUALIB_API char*() luaL_buffinitsize ( lua_State L,
luaL_Buffer B,
size_t  sz 
)

Definition at line 638 of file lauxlib.c.

◆ luaL_callmeta()

LUALIB_API int() luaL_callmeta ( lua_State L,
int  obj,
const char *  e 
)

Definition at line 861 of file lauxlib.c.

◆ luaL_checkany()

LUALIB_API void() luaL_checkany ( lua_State L,
int  arg 
)

Definition at line 396 of file lauxlib.c.

◆ luaL_checkinteger()

LUALIB_API lua_Integer() luaL_checkinteger ( lua_State L,
int  arg 
)

Definition at line 442 of file lauxlib.c.

◆ luaL_checklstring()

const LUALIB_API char*() luaL_checklstring ( lua_State L,
int  arg,
size_t *  l 
)

Definition at line 402 of file lauxlib.c.

◆ luaL_checknumber()

LUALIB_API lua_Number() luaL_checknumber ( lua_State L,
int  arg 
)

Definition at line 420 of file lauxlib.c.

◆ luaL_checkoption()

LUALIB_API int() luaL_checkoption ( lua_State L,
int  arg,
const char *  def,
const char *const  lst[] 
)

Definition at line 360 of file lauxlib.c.

◆ luaL_checkstack()

LUALIB_API void() luaL_checkstack ( lua_State L,
int  sz,
const char *  msg 
)

Definition at line 380 of file lauxlib.c.

◆ luaL_checktype()

LUALIB_API void() luaL_checktype ( lua_State L,
int  arg,
int  t 
)

Definition at line 390 of file lauxlib.c.

◆ luaL_checkudata()

LUALIB_API void*() luaL_checkudata ( lua_State L,
int  ud,
const char *  tname 
)

Definition at line 345 of file lauxlib.c.

◆ luaL_checkversion_()

LUALIB_API void() luaL_checkversion_ ( lua_State L,
lua_Number  ver,
size_t  sz 
)

Definition at line 1097 of file lauxlib.c.

◆ luaL_error()

LUALIB_API int() luaL_error ( lua_State L,
const char *  fmt,
  ... 
)

Definition at line 234 of file lauxlib.c.

◆ luaL_execresult()

LUALIB_API int() luaL_execresult ( lua_State L,
int  stat 
)

Definition at line 285 of file lauxlib.c.

◆ luaL_fileresult()

LUALIB_API int() luaL_fileresult ( lua_State L,
int  stat,
const char *  fname 
)

Definition at line 245 of file lauxlib.c.

◆ luaL_getmetafield()

LUALIB_API int() luaL_getmetafield ( lua_State L,
int  obj,
const char *  e 
)

Definition at line 845 of file lauxlib.c.

◆ luaL_getsubtable()

LUALIB_API int() luaL_getsubtable ( lua_State L,
int  idx,
const char *  fname 
)

Definition at line 947 of file lauxlib.c.

◆ luaL_gsub()

const LUALIB_API char*() luaL_gsub ( lua_State L,
const char *  s,
const char *  p,
const char *  r 
)

Definition at line 1000 of file lauxlib.c.

◆ luaL_len()

LUALIB_API lua_Integer() luaL_len ( lua_State L,
int  idx 
)

Definition at line 871 of file lauxlib.c.

◆ luaL_loadbufferx()

LUALIB_API int() luaL_loadbufferx ( lua_State L,
const char *  buff,
size_t  sz,
const char *  name,
const char *  mode 
)

Definition at line 828 of file lauxlib.c.

◆ luaL_loadfilex()

LUALIB_API int() luaL_loadfilex ( lua_State L,
const char *  filename,
const char *  mode 
)

Definition at line 776 of file lauxlib.c.

◆ luaL_loadstring()

LUALIB_API int() luaL_loadstring ( lua_State L,
const char *  s 
)

Definition at line 837 of file lauxlib.c.

◆ luaL_newmetatable()

LUALIB_API int() luaL_newmetatable ( lua_State L,
const char *  tname 
)

Definition at line 311 of file lauxlib.c.

◆ luaL_newstate()

LUALIB_API lua_State*() luaL_newstate ( void  )

Definition at line 1087 of file lauxlib.c.

◆ luaL_optinteger()

LUALIB_API lua_Integer() luaL_optinteger ( lua_State L,
int  arg,
lua_Integer  def 
)

Definition at line 452 of file lauxlib.c.

◆ luaL_optlstring()

const LUALIB_API char*() luaL_optlstring ( lua_State L,
int  arg,
const char *  def,
size_t *  l 
)

Definition at line 409 of file lauxlib.c.

◆ luaL_optnumber()

LUALIB_API lua_Number() luaL_optnumber ( lua_State L,
int  arg,
lua_Number  def 
)

Definition at line 429 of file lauxlib.c.

◆ luaL_prepbuffsize()

LUALIB_API char*() luaL_prepbuffsize ( luaL_Buffer B,
size_t  sz 
)

Definition at line 574 of file lauxlib.c.

◆ luaL_pushresult()

LUALIB_API void() luaL_pushresult ( luaL_Buffer B)

Definition at line 593 of file lauxlib.c.

◆ luaL_pushresultsize()

LUALIB_API void() luaL_pushresultsize ( luaL_Buffer B,
size_t  sz 
)

Definition at line 603 of file lauxlib.c.

◆ luaL_ref()

LUALIB_API int() luaL_ref ( lua_State L,
int  t 
)

Definition at line 660 of file lauxlib.c.

◆ luaL_requiref()

LUALIB_API void() luaL_requiref ( lua_State L,
const char *  modname,
lua_CFunction  openf,
int  glb 
)

Definition at line 967 of file lauxlib.c.

◆ luaL_setfuncs()

LUALIB_API void() luaL_setfuncs ( lua_State L,
const luaL_Reg l,
int  nup 
)

Definition at line 926 of file lauxlib.c.

◆ luaL_setmetatable()

LUALIB_API void() luaL_setmetatable ( lua_State L,
const char *  tname 
)

Definition at line 324 of file lauxlib.c.

◆ luaL_testudata()

LUALIB_API void*() luaL_testudata ( lua_State L,
int  ud,
const char *  tname 
)

Definition at line 330 of file lauxlib.c.

◆ luaL_tolstring()

const LUALIB_API char*() luaL_tolstring ( lua_State L,
int  idx,
size_t *  len 
)

Definition at line 883 of file lauxlib.c.

◆ luaL_traceback()

LUALIB_API void() luaL_traceback ( lua_State L,
lua_State L1,
const char *  msg,
int  level 
)

Definition at line 131 of file lauxlib.c.

◆ luaL_typeerror()

LUALIB_API int() luaL_typeerror ( lua_State L,
int  arg,
const char *  tname 
)

Definition at line 193 of file lauxlib.c.

◆ luaL_unref()

LUALIB_API void() luaL_unref ( lua_State L,
int  t,
int  ref 
)

Definition at line 688 of file lauxlib.c.

◆ luaL_where()

LUALIB_API void() luaL_where ( lua_State L,
int  lvl 
)

Definition at line 216 of file lauxlib.c.

nonstd::span_lite::size
span_constexpr std::size_t size(span< T, Extent > const &spn)
Definition: span.hpp:1554
nlohmann::detail::void
j template void())
Definition: json.hpp:4061
luaL_prepbuffsize
LUALIB_API char *() luaL_prepbuffsize(luaL_Buffer *B, size_t sz)
Definition: lauxlib.c:574
B
#define B(name, bit)


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:49