The Battle for Wesnoth  1.15.1+dev
Macros | Functions
lfunc.cpp File Reference
#include "lprefix.h"
#include <stddef.h>
#include "lua.h"
#include "lfunc.h"
#include "lgc.h"
#include "lmem.h"
#include "lobject.h"
#include "lstate.h"
Include dependency graph for lfunc.cpp:

Go to the source code of this file.


#define lfunc_c
#define LUA_CORE


CClosureluaF_newCclosure (lua_State *L, int n)
LClosureluaF_newLclosure (lua_State *L, int n)
void luaF_initupvals (lua_State *L, LClosure *cl)
UpValluaF_findupval (lua_State *L, StkId level)
void luaF_close (lua_State *L, StkId level)
ProtoluaF_newproto (lua_State *L)
void luaF_freeproto (lua_State *L, Proto *f)
const char * luaF_getlocalname (const Proto *f, int local_number, int pc)

Macro Definition Documentation

◆ lfunc_c

#define lfunc_c

Definition at line 7 of file lfunc.cpp.


#define LUA_CORE

Definition at line 8 of file lfunc.cpp.

Function Documentation

◆ luaF_close()

void luaF_close ( lua_State L,
StkId  level 

◆ luaF_findupval()

UpVal* luaF_findupval ( lua_State L,
StkId  level 

◆ luaF_freeproto()

void luaF_freeproto ( lua_State L,
Proto f 

◆ luaF_getlocalname()

const char* luaF_getlocalname ( const Proto f,
int  local_number,
int  pc 

Definition at line 140 of file lfunc.cpp.

References getstr, i, Proto::locvars, Proto::sizelocvars, LocVar::startpc, and LocVar::varname.

Referenced by findlocal(), getobjname(), and lua_getlocal().

◆ luaF_initupvals()

void luaF_initupvals ( lua_State L,
LClosure cl 

Definition at line 45 of file lfunc.cpp.

References i, luaM_new, UpVal::refcount, setnilvalue, UpVal::u, LClosure::upvals, UpVal::v, and UpVal::value.

Referenced by f_parser().

◆ luaF_newCclosure()

CClosure* luaF_newCclosure ( lua_State L,
int  n 

Definition at line 25 of file lfunc.cpp.

References c, cast_byte, gco2ccl, LUA_TCCL, luaC_newobj(), and sizeCclosure.

Referenced by lua_pushcclosure().

◆ luaF_newLclosure()

LClosure* luaF_newLclosure ( lua_State L,
int  n 

Definition at line 33 of file lfunc.cpp.

References c, cast_byte, gco2lcl, LUA_TLCL, luaC_newobj(), n, LClosure::p, sizeLclosure, and LClosure::upvals.

Referenced by luaU_undump(), luaY_parser(), and pushclosure().

◆ luaF_newproto()

Proto* luaF_newproto ( lua_State L)