diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-07 16:27:39 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-07 16:27:39 -0200 |
commit | aa7b1fcec4f4a8147150fcb726146800c3c6af7e (patch) | |
tree | 2c48bf687ad3400fe0a97f5bd568b10ef9105a0b /lua.h | |
parent | d95a8b312166752e2211678b33514edb1d68a0a6 (diff) | |
download | lua-aa7b1fcec4f4a8147150fcb726146800c3c6af7e.tar.gz lua-aa7b1fcec4f4a8147150fcb726146800c3c6af7e.tar.bz2 lua-aa7b1fcec4f4a8147150fcb726146800c3c6af7e.zip |
new API
Diffstat (limited to 'lua.h')
-rw-r--r-- | lua.h | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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 | |||
29 | typedef void (*lua_CFunction) (void); | 29 | typedef void (*lua_CFunction) (void); |
30 | typedef unsigned int lua_Object; | 30 | typedef unsigned int lua_Object; |
31 | 31 | ||
32 | lua_Object lua_setfallback (char *name, lua_CFunction fallback); | ||
33 | |||
32 | void lua_error (char *s); | 34 | void lua_error (char *s); |
33 | int lua_dofile (char *filename); | 35 | int lua_dofile (char *filename); |
34 | int lua_dostring (char *string); | 36 | int lua_dostring (char *string); |
@@ -54,7 +56,7 @@ lua_Object lua_getglobal (char *name); | |||
54 | int lua_storeglobal (char *name); | 56 | int lua_storeglobal (char *name); |
55 | 57 | ||
56 | int lua_storesubscript (void); | 58 | int lua_storesubscript (void); |
57 | lua_Object lua_getIndex (void); | 59 | lua_Object lua_getsubscript (void); |
58 | 60 | ||
59 | int lua_type (lua_Object object); | 61 | int 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) |