aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/lua.h b/lua.h
index 6fe7aca0..8aba1579 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.11 1994/11/18 19:46:21 roberto Stab roberto $ 5** $Id: lua.h,v 3.12 1994/12/13 15:54:21 roberto Exp roberto $
6*/ 6*/
7 7
8 8
@@ -25,6 +25,8 @@ typedef enum
25 25
26/* Public Part */ 26/* Public Part */
27 27
28#define LUA_NOOBJECT 0
29
28typedef void (*lua_CFunction) (void); 30typedef void (*lua_CFunction) (void);
29typedef unsigned int lua_Object; 31typedef unsigned int lua_Object;
30 32
@@ -44,7 +46,6 @@ lua_Object lua_getparam (int number);
44 46
45float lua_getnumber (lua_Object object); 47float lua_getnumber (lua_Object object);
46char *lua_getstring (lua_Object object); 48char *lua_getstring (lua_Object object);
47char *lua_copystring (lua_Object object);
48lua_CFunction lua_getcfunction (lua_Object object); 49lua_CFunction lua_getcfunction (lua_Object object);
49void *lua_getuserdata (lua_Object object); 50void *lua_getuserdata (lua_Object object);
50 51
@@ -68,7 +69,7 @@ int lua_lock (void);
68lua_Object lua_getlocked (int ref); 69lua_Object lua_getlocked (int ref);
69void lua_unlock (int ref); 70void lua_unlock (int ref);
70 71
71lua_Object lua_createtable (int initSize); 72lua_Object lua_createtable (void);
72 73
73 74
74/* some useful macros */ 75/* some useful macros */
@@ -93,4 +94,6 @@ lua_Object lua_createtable (int initSize);
93#define lua_getindexed(o,n) (lua_pushobject(o), lua_pushnumber(n), lua_getsubscript()) 94#define lua_getindexed(o,n) (lua_pushobject(o), lua_pushnumber(n), lua_getsubscript())
94#define lua_getfield(o,f) (lua_pushobject(o), lua_pushstring(f), lua_getsubscript()) 95#define lua_getfield(o,f) (lua_pushobject(o), lua_pushstring(f), lua_getsubscript())
95 96
97#define lua_copystring(o) (strdup(lua_getstring(o)))
98
96#endif 99#endif