From aa7b1fcec4f4a8147150fcb726146800c3c6af7e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 7 Nov 1994 16:27:39 -0200 Subject: new API --- lua.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lua.h') diff --git a/lua.h b/lua.h index 0f320dce..11be9a6a 100644 --- a/lua.h +++ b/lua.h @@ -2,7 +2,7 @@ ** LUA - Linguagem para Usuarios de Aplicacao ** Grupo de Tecnologia em Computacao Grafica ** TeCGraf - PUC-Rio -** $Id: lua.h,v 3.2 1994/11/04 10:47:49 roberto Exp roberto $ +** $Id: lua.h,v 3.3 1994/11/07 16:34:44 roberto Exp $ */ @@ -29,6 +29,8 @@ typedef enum typedef void (*lua_CFunction) (void); typedef unsigned int lua_Object; +lua_Object lua_setfallback (char *name, lua_CFunction fallback); + void lua_error (char *s); int lua_dofile (char *filename); int lua_dostring (char *string); @@ -54,7 +56,7 @@ lua_Object lua_getglobal (char *name); int lua_storeglobal (char *name); int lua_storesubscript (void); -lua_Object lua_getIndex (void); +lua_Object lua_getsubscript (void); int lua_type (lua_Object object); @@ -65,8 +67,8 @@ int lua_type (lua_Object object); #define lua_call(f) lua_callfunction(lua_getglobal(f)) -#define lua_getindexed(o,n) (lua_pushobject(o), lua_pushnumber(n), lua_getIndex()) -#define lua_getfield(o,f) (lua_pushobject(o), lua_pushstring(f), lua_getIndex()) +#define lua_getindexed(o,n) (lua_pushobject(o), lua_pushnumber(n), lua_getsubscript()) +#define lua_getfield(o,f) (lua_pushobject(o), lua_pushstring(f), lua_getsubscript()) #define lua_isnil(_) (lua_type(_)==LUA_T_NIL) #define lua_isnumber(_) (lua_type(_)==LUA_T_NUMBER) -- cgit v1.2.3-55-g6feb