diff options
| author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-05-21 19:01:41 +0000 |
|---|---|---|
| committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-05-21 19:01:41 +0000 |
| commit | cf87597226f5d6b269f1f2c4d6f402aa1eccb852 (patch) | |
| tree | 4ba1f3ae53b3bd9cae0e2c6c4dd57836b43a5ece /apps/plugins/lua/lvm.h | |
| parent | c483efadc63eaed35b5fb5e4e02c2282daf32470 (diff) | |
| download | rockbox-cf87597226f5d6b269f1f2c4d6f402aa1eccb852.zip rockbox-cf87597226f5d6b269f1f2c4d6f402aa1eccb852.tar.gz rockbox-cf87597226f5d6b269f1f2c4d6f402aa1eccb852.tar.bz2 rockbox-cf87597226f5d6b269f1f2c4d6f402aa1eccb852.tar.xz | |
Commit FS#9174: Lua scripting language by Dan Everton
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21020 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lua/lvm.h')
| -rw-r--r-- | apps/plugins/lua/lvm.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/apps/plugins/lua/lvm.h b/apps/plugins/lua/lvm.h new file mode 100644 index 0000000..dff2a13 --- /dev/null +++ b/apps/plugins/lua/lvm.h @@ -0,0 +1,36 @@ +/* +** $Id$ +** Lua virtual machine +** See Copyright Notice in lua.h +*/ + +#ifndef lvm_h +#define lvm_h + + +#include "ldo.h" +#include "lobject.h" +#include "ltm.h" + + +#define tostring(L,o) ((ttype(o) == LUA_TSTRING) || (luaV_tostring(L, o))) + +#define tonumber(o,n) (ttype(o) == LUA_TNUMBER || \ + (((o) = luaV_tonumber(o,n)) != NULL)) + +#define equalobj(L,o1,o2) \ + (ttype(o1) == ttype(o2) && luaV_equalval(L, o1, o2)) + + +LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r); +LUAI_FUNC int luaV_equalval (lua_State *L, const TValue *t1, const TValue *t2); +LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n); +LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj); +LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key, + StkId val); +LUAI_FUNC void luaV_settable (lua_State *L, const TValue *t, TValue *key, + StkId val); +LUAI_FUNC void luaV_execute (lua_State *L, int nexeccalls); +LUAI_FUNC void luaV_concat (lua_State *L, int total, int last); + +#endif |