view src/lua/lvm.h @ 249:99227bec1123

Reworked the hxc definitions; they are now fns that optionally take a single rom arg and dynamically grab the data. Their commonalities are also consolidated into a single template function, hxc-thunk. Minor fixes include stripping pokenames of their padding and splitting the huge hxc-dialog string into a list.
author Dylan Holmes <ocsenave@gmail.com>
date Mon, 26 Mar 2012 03:45:24 -0500
parents 27763b933818
children
line wrap: on
line source
1 /*
2 ** $Id: lvm.h,v 2.5.1.1 2007/12/27 13:02:25 roberto Exp $
3 ** Lua virtual machine
4 ** See Copyright Notice in lua.h
5 */
7 #ifndef lvm_h
8 #define lvm_h
11 #include "ldo.h"
12 #include "lobject.h"
13 #include "ltm.h"
16 #define tostring(L,o) ((ttype(o) == LUA_TSTRING) || (luaV_tostring(L, o)))
18 #define tonumber(o,n) (ttype(o) == LUA_TNUMBER || \
19 (((o) = luaV_tonumber(o,n)) != NULL))
21 #define equalobj(L,o1,o2) \
22 (ttype(o1) == ttype(o2) && luaV_equalval(L, o1, o2))
25 LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r);
26 LUAI_FUNC int luaV_equalval (lua_State *L, const TValue *t1, const TValue *t2);
27 LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n);
28 LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj);
29 LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key,
30 StkId val);
31 LUAI_FUNC void luaV_settable (lua_State *L, const TValue *t, TValue *key,
32 StkId val);
33 LUAI_FUNC void luaV_execute (lua_State *L, int nexeccalls);
34 LUAI_FUNC void luaV_concat (lua_State *L, int total, int last);
36 #endif