lua/lfunc.c File Reference

#include <stdlib.h>
#include "lua.h"
#include "lfunc.h"
#include "lgc.h"
#include "lmem.h"
#include "lobject.h"
#include "lstate.h"

Go to the source code of this file.

Defines

#define lfunc_c
#define sizeCclosure(n)
#define sizeLclosure(n)

Functions

ClosureluaF_newCclosure (lua_State *L, int nelems)
ClosureluaF_newLclosure (lua_State *L, int nelems, TObject *e)
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)
void luaF_freeclosure (lua_State *L, Closure *c)
const char * luaF_getlocalname (const Proto *f, int local_number, int pc)


Define Documentation

#define lfunc_c

Definition at line 10 of file lfunc.c.

#define sizeCclosure (  ) 

Value:

(cast(int, sizeof(CClosure)) + \
                         cast(int, sizeof(TObject)*((n)-1)))

Definition at line 21 of file lfunc.c.

Referenced by luaF_freeclosure(), and luaF_newCclosure().

#define sizeLclosure (  ) 

Value:

(cast(int, sizeof(LClosure)) + \
                         cast(int, sizeof(TObject *)*((n)-1)))

Definition at line 24 of file lfunc.c.

Referenced by luaF_freeclosure(), and luaF_newLclosure().


Function Documentation

void luaF_close ( lua_State L,
StkId  level 
)

UpVal* luaF_findupval ( lua_State L,
StkId  level 
)

Definition at line 48 of file lfunc.c.

References LUA_TUPVAL, luaM_new, UpVal::marked, UpVal::next, ngcotouv, lua_State::openupval, UpVal::tt, UpVal::v, and valtogco.

Referenced by luaV_execute().

void luaF_freeclosure ( lua_State L,
Closure c 
)

void luaF_freeproto ( lua_State L,
Proto f 
)

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

Definition at line 124 of file lfunc.c.

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

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

Closure* luaF_newCclosure ( lua_State L,
int  nelems 
)

Definition at line 29 of file lfunc.c.

References Closure::c, cast, CClosure::isC, luaC_link(), luaM_malloc, CClosure::nupvalues, sizeCclosure, and valtogco.

Referenced by f_Ccall(), and lua_pushcclosure().

Closure* luaF_newLclosure ( lua_State L,
int  nelems,
TObject e 
)

Proto* luaF_newproto ( lua_State L  ) 


Generated on Fri Dec 12 13:02:11 2008 for rpm by  doxygen 1.5.6