aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h30
1 files changed, 20 insertions, 10 deletions
diff --git a/lua.h b/lua.h
index e656134e..623465e1 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.33 1997/02/11 11:40:01 roberto Exp roberto $ 5** $Id: lua.h,v 3.34 1997/02/20 15:51:14 roberto Exp roberto $
6*/ 6*/
7 7
8 8
@@ -19,13 +19,19 @@
19typedef void (*lua_CFunction) (void); 19typedef void (*lua_CFunction) (void);
20typedef unsigned int lua_Object; 20typedef unsigned int lua_Object;
21 21
22lua_Object lua_setfallback (char *name, lua_CFunction fallback); 22lua_Object lua_setfallback (char *event, lua_CFunction fallback);
23void lua_setintmethod (int tag, char *event, lua_CFunction method);
24
25int lua_newtag (char *t);
26void lua_settag (int tag); /* In: object */
23 27
24void lua_error (char *s); 28void lua_error (char *s);
25int lua_dofile (char *filename); 29int lua_dofile (char *filename); /* Out: returns */
26int lua_dostring (char *string); 30int lua_dostring (char *string); /* Out: returns */
27int lua_callfunction (lua_Object function); 31int lua_callfunction (lua_Object f);
32 /* In: parameters; Out: returns */
28int lua_call (char *funcname); 33int lua_call (char *funcname);
34 /* In: parameters; Out: returns */
29 35
30void lua_beginblock (void); 36void lua_beginblock (void);
31void lua_endblock (void); 37void lua_endblock (void);
@@ -56,15 +62,17 @@ void lua_pushusertag (void *u, int tag);
56void lua_pushobject (lua_Object object); 62void lua_pushobject (lua_Object object);
57 63
58lua_Object lua_getglobal (char *name); 64lua_Object lua_getglobal (char *name);
59void lua_storeglobal (char *name); 65void lua_storeglobal (char *name); /* In: value */
60 66
61void lua_storesubscript (void); 67void lua_storesubscript (void); /* In: table, index, value */
62lua_Object lua_getsubscript (void); 68void lua_basicstoreindex (void); /* In: table, index, value */
69lua_Object lua_getsubscript (void); /* In: table, index */
70lua_Object lua_basicindex (void); /* In: table, index */
63 71
64int lua_type (lua_Object object); 72int lua_tag (lua_Object object);
65 73
66 74
67int lua_ref (int lock); 75int lua_ref (int lock); /* In: value */
68lua_Object lua_getref (int ref); 76lua_Object lua_getref (int ref);
69void lua_pushref (int ref); 77void lua_pushref (int ref);
70void lua_unref (int ref); 78void lua_unref (int ref);
@@ -84,6 +92,8 @@ lua_Object lua_createtable (void);
84 92
85/* for compatibility with old versions. Avoid using these macros */ 93/* for compatibility with old versions. Avoid using these macros */
86 94
95#define lua_type(o) (lua_tag(o))
96
87#define lua_getuserdata(o) (*(void **)lua_getbinarydata(o)) 97#define lua_getuserdata(o) (*(void **)lua_getbinarydata(o))
88 98
89#define lua_lockobject(o) lua_refobject(o,1) 99#define lua_lockobject(o) lua_refobject(o,1)