lua/lvm.h File Reference

#include "ldo.h"
#include "lobject.h"
#include "ltm.h"

Go to the source code of this file.

Defines

#define tostring(L, o)   ((ttype(o) == LUA_TSTRING) || (luaV_tostring(L, o)))
#define tonumber(o, n)
#define equalobj(L, o1, o2)   (ttype(o1) == ttype(o2) && luaV_equalval(L, o1, o2))

Functions

int luaV_lessthan (lua_State *L, const TObject *l, const TObject *r)
int luaV_equalval (lua_State *L, const TObject *t1, const TObject *t2)
const TObjectluaV_tonumber (const TObject *obj, TObject *n)
int luaV_tostring (lua_State *L, StkId obj)
const TObjectluaV_gettable (lua_State *L, const TObject *t, TObject *key, int loop)
void luaV_settable (lua_State *L, const TObject *t, TObject *key, StkId val)
StkId luaV_execute (lua_State *L)
void luaV_concat (lua_State *L, int total, int last)


Define Documentation

#define equalobj ( L,
o1,
o2   )     (ttype(o1) == ttype(o2) && luaV_equalval(L, o1, o2))

Definition at line 21 of file lvm.h.

Referenced by lua_equal().

#define tonumber ( o,
 ) 

Value:

(ttype(o) == LUA_TNUMBER || \
                         (((o) = luaV_tonumber(o,n)) != NULL))

Definition at line 18 of file lvm.h.

Referenced by lua_isnumber(), and lua_tonumber().

#define tostring ( L,
 )     ((ttype(o) == LUA_TSTRING) || (luaV_tostring(L, o)))

Definition at line 16 of file lvm.h.

Referenced by luaV_concat().


Function Documentation

void luaV_concat ( lua_State L,
int  total,
int  last 
)

Definition at line 340 of file lvm.c.

References lua_State::base, call_binTM(), cast, G, luaG_concaterror(), luaG_runerror(), luaS_newlstr(), luaZ_openspace(), MAX_SIZET, setsvalue2s, svalue, TM_CONCAT, tostring, and tsvalue.

Referenced by lua_concat(), and luaO_pushvfstring().

int luaV_equalval ( lua_State L,
const TObject t1,
const TObject t2 
)

Definition at line 313 of file lvm.c.

References bvalue, callTMres(), gcvalue, get_compTM(), hvalue, l_isfalse, lua_assert, nvalue, pvalue, TM_EQ, lua_State::top, ttype, and uvalue.

StkId luaV_execute ( lua_State L  ) 

Definition at line 424 of file lvm.c.

References lua_State::base, lua_State::ci, CI_CALLING, CI_HASFRAME, CI_SAVEDPC, CI_YIELD, clvalue, lua_State::hookcount, lua_State::hookmask, Proto::k, CallInfo::l, lua_assert, luaD_callhook(), LClosure::p, CallInfo::state, traceexec(), and CallInfo::u.

Referenced by luaD_call(), and resume().

const TObject* luaV_gettable ( lua_State L,
const TObject t,
TObject key,
int  loop 
)

Definition at line 166 of file lvm.c.

References hvalue, luaG_runerror(), luaH_get(), luaV_getnotable(), luaV_index(), MAXTAGLOOP, ttisnil, and ttistable.

Referenced by lua_gettable(), luaV_getnotable(), and luaV_index().

int luaV_lessthan ( lua_State L,
const TObject l,
const TObject r 
)

Definition at line 281 of file lvm.c.

References call_orderTM(), luaG_ordererror(), luaV_strcmp(), nvalue, TM_LT, tsvalue, ttisnumber, ttisstring, and ttype.

Referenced by lua_lessthan().

void luaV_settable ( lua_State L,
const TObject t,
TObject key,
StkId  val 
)

Definition at line 183 of file lvm.c.

References callTM(), fasttm, hvalue, luaG_runerror(), luaG_typeerror(), luaH_set(), luaT_gettmbyobj(), MAXTAGLOOP, Table::metatable, setobj2t, TM_NEWINDEX, ttisfunction, ttisnil, and ttistable.

Referenced by lua_settable().

const TObject* luaV_tonumber ( const TObject obj,
TObject n 
)

Definition at line 43 of file lvm.c.

References luaO_str2d(), setnvalue, svalue, ttisnumber, and ttisstring.

Referenced by Arith(), and luaG_aritherror().

int luaV_tostring ( lua_State L,
StkId  obj 
)

Definition at line 55 of file lvm.c.

References lua_number2str, luaS_new, nvalue, setsvalue2s, and ttisnumber.

Referenced by lua_strlen(), and lua_tostring().


Generated on Fri Oct 12 08:44:56 2007 for rpm by  doxygen 1.5.2