aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h29
1 files changed, 24 insertions, 5 deletions
diff --git a/lua.h b/lua.h
index a93ef30e..f9a0a500 100644
--- a/lua.h
+++ b/lua.h
@@ -2,13 +2,29 @@
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 1.4 1994/08/24 15:29:02 celes Exp roberto $ 5** $Id: lua.h,v 1.5 1994/11/01 17:54:31 roberto Exp $
6*/ 6*/
7 7
8 8
9#ifndef lua_h 9#ifndef lua_h
10#define lua_h 10#define lua_h
11 11
12/* Private Part */
13
14typedef enum
15{
16 LUA_T_MARK,
17 LUA_T_NIL,
18 LUA_T_NUMBER,
19 LUA_T_STRING,
20 LUA_T_ARRAY,
21 LUA_T_FUNCTION,
22 LUA_T_CFUNCTION,
23 LUA_T_USERDATA
24} Type;
25
26
27/* Public Part */
12 28
13typedef void (*lua_CFunction) (void); 29typedef void (*lua_CFunction) (void);
14typedef struct Object *lua_Object; 30typedef struct Object *lua_Object;
@@ -19,8 +35,7 @@ void lua_errorfunction (void (*fn) (char *s));
19void lua_error (char *s); 35void lua_error (char *s);
20int lua_dofile (char *filename); 36int lua_dofile (char *filename);
21int lua_dostring (char *string); 37int lua_dostring (char *string);
22int lua_call (char *functionname, int nparam); 38int lua_callfunction (lua_Object function);
23int lua_callfunction (lua_Object function, int nparam);
24 39
25lua_Object lua_getparam (int number); 40lua_Object lua_getparam (int number);
26float lua_getnumber (lua_Object object); 41float lua_getnumber (lua_Object object);
@@ -33,8 +48,6 @@ lua_Object lua_getfield (lua_Object object, char *field);
33lua_Object lua_getindexed (lua_Object object, float index); 48lua_Object lua_getindexed (lua_Object object, float index);
34lua_Object lua_getglobal (char *name); 49lua_Object lua_getglobal (char *name);
35 50
36lua_Object lua_pop (void);
37
38int lua_pushnil (void); 51int lua_pushnil (void);
39int lua_pushnumber (float n); 52int lua_pushnumber (float n);
40int lua_pushstring (char *s); 53int lua_pushstring (char *s);
@@ -57,4 +70,10 @@ int lua_isfunction (lua_Object object);
57int lua_iscfunction (lua_Object object); 70int lua_iscfunction (lua_Object object);
58int lua_isuserdata (lua_Object object); 71int lua_isuserdata (lua_Object object);
59 72
73
74/* for lua 1.1 */
75
76#define lua_call(f) lua_callfunction(lua_getglobal(f))
77
78
60#endif 79#endif