summaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1994-11-07 16:27:39 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1994-11-07 16:27:39 -0200
commitaa7b1fcec4f4a8147150fcb726146800c3c6af7e (patch)
tree2c48bf687ad3400fe0a97f5bd568b10ef9105a0b /lua.h
parentd95a8b312166752e2211678b33514edb1d68a0a6 (diff)
downloadlua-aa7b1fcec4f4a8147150fcb726146800c3c6af7e.tar.gz
lua-aa7b1fcec4f4a8147150fcb726146800c3c6af7e.tar.bz2
lua-aa7b1fcec4f4a8147150fcb726146800c3c6af7e.zip
new API
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/lua.h b/lua.h
index 0f320dce..11be9a6a 100644
--- a/lua.h
+++ b/lua.h
@@ -2,7 +2,7 @@
2** LUA - Linguagem para Usuarios de Aplicacao 2** LUA - Linguagem para Usuarios de Aplicacao
3** Grupo de Tecnologia em Computacao Grafica 3** Grupo de Tecnologia em Computacao Grafica
4** TeCGraf - PUC-Rio 4** TeCGraf - PUC-Rio
5** $Id: lua.h,v 3.2 1994/11/04 10:47:49 roberto Exp roberto $ 5** $Id: lua.h,v 3.3 1994/11/07 16:34:44 roberto Exp $
6*/ 6*/
7 7
8 8
@@ -29,6 +29,8 @@ typedef enum
29typedef void (*lua_CFunction) (void); 29typedef void (*lua_CFunction) (void);
30typedef unsigned int lua_Object; 30typedef unsigned int lua_Object;
31 31
32lua_Object lua_setfallback (char *name, lua_CFunction fallback);
33
32void lua_error (char *s); 34void lua_error (char *s);
33int lua_dofile (char *filename); 35int lua_dofile (char *filename);
34int lua_dostring (char *string); 36int lua_dostring (char *string);
@@ -54,7 +56,7 @@ lua_Object lua_getglobal (char *name);
54int lua_storeglobal (char *name); 56int lua_storeglobal (char *name);
55 57
56int lua_storesubscript (void); 58int lua_storesubscript (void);
57lua_Object lua_getIndex (void); 59lua_Object lua_getsubscript (void);
58 60
59int lua_type (lua_Object object); 61int lua_type (lua_Object object);
60 62
@@ -65,8 +67,8 @@ int lua_type (lua_Object object);
65 67
66#define lua_call(f) lua_callfunction(lua_getglobal(f)) 68#define lua_call(f) lua_callfunction(lua_getglobal(f))
67 69
68#define lua_getindexed(o,n) (lua_pushobject(o), lua_pushnumber(n), lua_getIndex()) 70#define lua_getindexed(o,n) (lua_pushobject(o), lua_pushnumber(n), lua_getsubscript())
69#define lua_getfield(o,f) (lua_pushobject(o), lua_pushstring(f), lua_getIndex()) 71#define lua_getfield(o,f) (lua_pushobject(o), lua_pushstring(f), lua_getsubscript())
70 72
71#define lua_isnil(_) (lua_type(_)==LUA_T_NIL) 73#define lua_isnil(_) (lua_type(_)==LUA_T_NIL)
72#define lua_isnumber(_) (lua_type(_)==LUA_T_NUMBER) 74#define lua_isnumber(_) (lua_type(_)==LUA_T_NUMBER)