The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Macros | Functions
lfunc.cpp File Reference
#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.

Macros

#define lfunc_c
 
#define LUA_CORE
 

Functions

ClosureluaF_newCclosure (lua_State *L, int n)
 
ClosureluaF_newLclosure (lua_State *L, int n)
 
UpValluaF_newupval (lua_State *L)
 
UpValluaF_findupval (lua_State *L, StkId level)
 
static void unlinkupval (UpVal *uv)
 
void luaF_freeupval (lua_State *L, UpVal *uv)
 
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

#define lfunc_c

Definition at line 9 of file lfunc.cpp.

#define LUA_CORE

Definition at line 10 of file lfunc.cpp.

Function Documentation

void luaF_close ( lua_State L,
StkId  level 
)
UpVal* luaF_findupval ( lua_State L,
StkId  level 
)
void luaF_freeproto ( lua_State L,
Proto f 
)
void luaF_freeupval ( lua_State L,
UpVal uv 
)

Definition at line 81 of file lfunc.cpp.

References luaM_free, UpVal::u, unlinkupval(), UpVal::v, and UpVal::value.

Referenced by freeobj(), and luaF_close().

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

Definition at line 149 of file lfunc.cpp.

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

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

Closure* luaF_newCclosure ( lua_State L,
int  n 
)

Definition at line 22 of file lfunc.cpp.

References Closure::c, c, cast_byte, GCObject::cl, LUA_TCCL, luaC_newobj(), and sizeCclosure.

Referenced by lua_pushcclosure().

Closure* luaF_newLclosure ( lua_State L,
int  n 
)
Proto* luaF_newproto ( lua_State L)
UpVal* luaF_newupval ( lua_State L)

Definition at line 38 of file lfunc.cpp.

References LUA_TUPVAL, luaC_newobj(), setnilvalue, UpVal::u, GCObject::uv, UpVal::v, and UpVal::value.

Referenced by f_parser().

static void unlinkupval ( UpVal uv)
static

Definition at line 74 of file lfunc.cpp.

References UpVal::l, lua_assert, and UpVal::u.

Referenced by luaF_close(), and luaF_freeupval().