sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Loading...
Searching...
No Matches
lstate.h File Reference
#include "lua.h"
#include "lobject.h"
#include "ltm.h"
#include "lzio.h"

Go to the source code of this file.

Classes

struct  stringtable
struct  CallInfo
struct  global_State
struct  lua_State
union  GCUnion

Macros

#define yieldable(L)
#define getCcalls(L)
#define incnny(L)
#define decnny(L)
#define nyci   (0x10000 | 1)
#define EXTRA_STACK   5
#define BASIC_STACK_SIZE   (2*LUA_MINSTACK)
#define stacksize(th)
#define KGC_INC   0
#define KGC_GEN   1
#define CIST_OAH   (1<<0)
#define CIST_C   (1<<1)
#define CIST_FRESH   (1<<2)
#define CIST_HOOKED   (1<<3)
#define CIST_YPCALL   (1<<4)
#define CIST_TAIL   (1<<5)
#define CIST_HOOKYIELD   (1<<6)
#define CIST_FIN   (1<<7)
#define CIST_TRAN   (1<<8)
#define CIST_CLSRET   (1<<9)
#define CIST_RECST   10
#define getcistrecst(ci)
#define setcistrecst(ci, st)
#define isLua(ci)
#define isLuacode(ci)
#define setoah(st, v)
#define getoah(st)
#define G(L)
#define completestate(g)
#define cast_u(o)
#define gco2ts(o)
#define gco2u(o)
#define gco2lcl(o)
#define gco2ccl(o)
#define gco2cl(o)
#define gco2t(o)
#define gco2p(o)
#define gco2th(o)
#define gco2upv(o)
#define obj2gco(v)
#define gettotalbytes(g)

Typedefs

typedef struct CallInfo CallInfo
typedef struct stringtable stringtable
typedef struct global_State global_State

Functions

LUAI_FUNC void luaE_setdebt (global_State *g, l_mem debt)
LUAI_FUNC void luaE_freethread (lua_State *L, lua_State *L1)
LUAI_FUNC CallInfo * luaE_extendCI (lua_State *L)
LUAI_FUNC void luaE_freeCI (lua_State *L)
LUAI_FUNC void luaE_shrinkCI (lua_State *L)
LUAI_FUNC void luaE_checkcstack (lua_State *L)
LUAI_FUNC void luaE_incCstack (lua_State *L)
LUAI_FUNC void luaE_warning (lua_State *L, const char *msg, int tocont)
LUAI_FUNC void luaE_warnerror (lua_State *L, const char *where)
LUAI_FUNC int luaE_resetthread (lua_State *L, int status)

Macro Definition Documentation

◆ BASIC_STACK_SIZE

#define BASIC_STACK_SIZE   (2*LUA_MINSTACK)

Definition at line 149 of file lstate.h.

◆ cast_u

#define cast_u ( o)
Value:
cast(union GCUnion *, (o))

Definition at line 374 of file lstate.h.

◆ CIST_C

#define CIST_C   (1<<1)

Definition at line 215 of file lstate.h.

◆ CIST_CLSRET

#define CIST_CLSRET   (1<<9)

Definition at line 223 of file lstate.h.

◆ CIST_FIN

#define CIST_FIN   (1<<7)

Definition at line 221 of file lstate.h.

◆ CIST_FRESH

#define CIST_FRESH   (1<<2)

Definition at line 216 of file lstate.h.

◆ CIST_HOOKED

#define CIST_HOOKED   (1<<3)

Definition at line 217 of file lstate.h.

◆ CIST_HOOKYIELD

#define CIST_HOOKYIELD   (1<<6)

Definition at line 220 of file lstate.h.

◆ CIST_OAH

#define CIST_OAH   (1<<0)

Definition at line 214 of file lstate.h.

◆ CIST_RECST

#define CIST_RECST   10

Definition at line 225 of file lstate.h.

◆ CIST_TAIL

#define CIST_TAIL   (1<<5)

Definition at line 219 of file lstate.h.

◆ CIST_TRAN

#define CIST_TRAN   (1<<8)

Definition at line 222 of file lstate.h.

◆ CIST_YPCALL

#define CIST_YPCALL   (1<<4)

Definition at line 218 of file lstate.h.

◆ completestate

#define completestate ( g)
Value:
ttisnil(&g->nilvalue)

Definition at line 345 of file lstate.h.

◆ decnny

#define decnny ( L)
Value:
((L)->nCcalls -= 0x10000)

Definition at line 118 of file lstate.h.

◆ EXTRA_STACK

#define EXTRA_STACK   5

Definition at line 146 of file lstate.h.

◆ G

#define G ( L)
Value:
(L->l_G)

Definition at line 339 of file lstate.h.

◆ gco2ccl

#define gco2ccl ( o)
Value:
check_exp((o)->tt == LUA_VCCL, &((cast_u(o))->cl.c))

Definition at line 381 of file lstate.h.

◆ gco2cl

#define gco2cl ( o)
Value:
check_exp(novariant((o)->tt) == LUA_TFUNCTION, &((cast_u(o))->cl))

Definition at line 382 of file lstate.h.

◆ gco2lcl

#define gco2lcl ( o)
Value:
check_exp((o)->tt == LUA_VLCL, &((cast_u(o))->cl.l))

Definition at line 380 of file lstate.h.

◆ gco2p

#define gco2p ( o)
Value:
check_exp((o)->tt == LUA_VPROTO, &((cast_u(o))->p))

Definition at line 385 of file lstate.h.

◆ gco2t

#define gco2t ( o)
Value:
check_exp((o)->tt == LUA_VTABLE, &((cast_u(o))->h))

Definition at line 384 of file lstate.h.

◆ gco2th

#define gco2th ( o)
Value:
check_exp((o)->tt == LUA_VTHREAD, &((cast_u(o))->th))

Definition at line 386 of file lstate.h.

◆ gco2ts

#define gco2ts ( o)
Value:
check_exp(novariant((o)->tt) == LUA_TSTRING, &((cast_u(o))->ts))

Definition at line 377 of file lstate.h.

◆ gco2u

#define gco2u ( o)
Value:
check_exp((o)->tt == LUA_VUSERDATA, &((cast_u(o))->u))

Definition at line 379 of file lstate.h.

◆ gco2upv

#define gco2upv ( o)
Value:
check_exp((o)->tt == LUA_VUPVAL, &((cast_u(o))->upv))

Definition at line 387 of file lstate.h.

◆ getCcalls

#define getCcalls ( L)
Value:
((L)->nCcalls & 0xffff)

Definition at line 111 of file lstate.h.

◆ getcistrecst

#define getcistrecst ( ci)
Value:
(((ci)->callstatus >> CIST_RECST) & 7)

Definition at line 237 of file lstate.h.

◆ getoah

#define getoah ( st)
Value:
((st) & CIST_OAH)

Definition at line 252 of file lstate.h.

◆ gettotalbytes

#define gettotalbytes ( g)
Value:
cast(lu_mem, (g)->totalbytes + (g)->GCdebt)

Definition at line 398 of file lstate.h.

◆ incnny

#define incnny ( L)
Value:
((L)->nCcalls += 0x10000)

Definition at line 115 of file lstate.h.

◆ isLua

#define isLua ( ci)
Value:
(!((ci)->callstatus & CIST_C))

Definition at line 245 of file lstate.h.

◆ isLuacode

#define isLuacode ( ci)
Value:
(!((ci)->callstatus & (CIST_C | CIST_HOOKED)))

Definition at line 248 of file lstate.h.

◆ KGC_GEN

#define KGC_GEN   1

Definition at line 156 of file lstate.h.

◆ KGC_INC

#define KGC_INC   0

Definition at line 155 of file lstate.h.

◆ nyci

#define nyci   (0x10000 | 1)

Definition at line 121 of file lstate.h.

◆ obj2gco

#define obj2gco ( v)
Value:
check_exp((v)->tt >= LUA_TSTRING, &(cast_u(v)->gc))

Definition at line 394 of file lstate.h.

◆ setcistrecst

#define setcistrecst ( ci,
st )
Value:
check_exp(((st) & 7) == (st), \
((ci)->callstatus = ((ci)->callstatus & ~(7 << CIST_RECST)) \
| ((st) << CIST_RECST)))

Definition at line 238 of file lstate.h.

◆ setoah

#define setoah ( st,
v )
Value:
((st) = ((st) & ~CIST_OAH) | (v))

Definition at line 251 of file lstate.h.

◆ stacksize

#define stacksize ( th)
Value:
cast_int((th)->stack_last.p - (th)->stack.p)

Definition at line 151 of file lstate.h.

◆ yieldable

#define yieldable ( L)
Value:
(((L)->nCcalls & 0xffff0000) == 0)

Definition at line 108 of file lstate.h.

Typedef Documentation

◆ CallInfo

typedef struct CallInfo CallInfo

Definition at line 18 of file lstate.h.

Function Documentation

◆ luaE_checkcstack()

LUAI_FUNC void luaE_checkcstack ( lua_State * L)

Definition at line 165 of file lstate.c.

◆ luaE_extendCI()

LUAI_FUNC CallInfo * luaE_extendCI ( lua_State * L)

Definition at line 105 of file lstate.c.

◆ luaE_freeCI()

LUAI_FUNC void luaE_freeCI ( lua_State * L)

Definition at line 122 of file lstate.c.

◆ luaE_freethread()

LUAI_FUNC void luaE_freethread ( lua_State * L,
lua_State * L1 )

Definition at line 313 of file lstate.c.

◆ luaE_incCstack()

LUAI_FUNC void luaE_incCstack ( lua_State * L)

Definition at line 173 of file lstate.c.

◆ luaE_resetthread()

LUAI_FUNC int luaE_resetthread ( lua_State * L,
int status )

Definition at line 323 of file lstate.c.

◆ luaE_setdebt()

LUAI_FUNC void luaE_setdebt ( global_State * g,
l_mem debt )

Definition at line 89 of file lstate.c.

◆ luaE_shrinkCI()

LUAI_FUNC void luaE_shrinkCI ( lua_State * L)

Definition at line 138 of file lstate.c.

◆ luaE_warnerror()

LUAI_FUNC void luaE_warnerror ( lua_State * L,
const char * where )

Definition at line 433 of file lstate.c.

◆ luaE_warning()

LUAI_FUNC void luaE_warning ( lua_State * L,
const char * msg,
int tocont )

Definition at line 423 of file lstate.c.