aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-06-18 18:20:45 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-06-18 18:20:45 -0300
commiteca17b24ea9853ff6c2d7101419e190c861983f0 (patch)
tree4f4520b87a5824191f8c307d72505c88184d89c9
parent6b61582e47b8dc9c2f9ebce4593f8b7a5e6aaf94 (diff)
downloadlua-eca17b24ea9853ff6c2d7101419e190c861983f0.tar.gz
lua-eca17b24ea9853ff6c2d7101419e190c861983f0.tar.bz2
lua-eca17b24ea9853ff6c2d7101419e190c861983f0.zip
#if wraps compatibility issue
-rw-r--r--lua.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/lua.h b/lua.h
index daa06f55..9b1e8dce 100644
--- a/lua.h
+++ b/lua.h
@@ -2,14 +2,14 @@
2** LUA - An Extensible Extension Language 2** LUA - An Extensible Extension Language
3** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil 3** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
4** e-mail: lua@tecgraf.puc-rio.br 4** e-mail: lua@tecgraf.puc-rio.br
5** $Id: lua.h,v 4.7 1997/06/12 18:27:29 roberto Exp roberto $ 5** $Id: lua.h,v 4.8 1997/06/16 19:48:18 roberto Exp roberto $
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#define LUA_VERSION "Lua 3.0 (alpha)" 12#define LUA_VERSION "Lua 3.0"
13#define LUA_COPYRIGHT "Copyright (C) 1994-1997 TeCGraf" 13#define LUA_COPYRIGHT "Copyright (C) 1994-1997 TeCGraf"
14#define LUA_AUTHORS "W. Celes, R. Ierusalimschy & L. H. de Figueiredo" 14#define LUA_AUTHORS "W. Celes, R. Ierusalimschy & L. H. de Figueiredo"
15 15
@@ -52,6 +52,8 @@ int lua_isfunction (lua_Object object);
52float lua_getnumber (lua_Object object); 52float lua_getnumber (lua_Object object);
53char *lua_getstring (lua_Object object); 53char *lua_getstring (lua_Object object);
54lua_CFunction lua_getcfunction (lua_Object object); 54lua_CFunction lua_getcfunction (lua_Object object);
55void *lua_getuserdata (lua_Object object);
56
55 57
56void lua_pushnil (void); 58void lua_pushnil (void);
57void lua_pushnumber (float n); 59void lua_pushnumber (float n);
@@ -98,6 +100,13 @@ long lua_collectgarbage (long limit);
98#define lua_pushuserdata(u) lua_pushusertag(u, 0) 100#define lua_pushuserdata(u) lua_pushusertag(u, 0)
99 101
100 102
103
104
105/* If your program has no compatibility problems, you can change
106** this to 0
107*/
108#if 1
109
101/* =============================================================== */ 110/* =============================================================== */
102/* for compatibility with old versions. Avoid using these macros/functions */ 111/* for compatibility with old versions. Avoid using these macros/functions */
103 112
@@ -106,8 +115,6 @@ lua_Object lua_setfallback (char *event, lua_CFunction fallback);
106#define lua_storeglobal lua_setglobal 115#define lua_storeglobal lua_setglobal
107#define lua_type lua_tag 116#define lua_type lua_tag
108 117
109void *lua_getuserdata (lua_Object object);
110
111#define lua_lockobject(o) lua_refobject(o,1) 118#define lua_lockobject(o) lua_refobject(o,1)
112#define lua_lock() lua_ref(1) 119#define lua_lock() lua_ref(1)
113#define lua_getlocked lua_getref 120#define lua_getlocked lua_getref
@@ -117,7 +124,7 @@ void *lua_getuserdata (lua_Object object);
117#define lua_pushliteral(o) lua_pushstring(o) 124#define lua_pushliteral(o) lua_pushstring(o)
118 125
119#define lua_getindexed(o,n) (lua_pushobject(o), lua_pushnumber(n), lua_gettable()) 126#define lua_getindexed(o,n) (lua_pushobject(o), lua_pushnumber(n), lua_gettable())
120#define lua_getfield(o,f) (lua_pushobject(o), lua_pushliteral(f), lua_gettable()) 127#define lua_getfield(o,f) (lua_pushobject(o), lua_pushstring(f), lua_gettable())
121 128
122#define lua_copystring(o) (strdup(lua_getstring(o))) 129#define lua_copystring(o) (strdup(lua_getstring(o)))
123 130
@@ -125,3 +132,5 @@ void *lua_getuserdata (lua_Object object);
125#define lua_storesubscript lua_settable 132#define lua_storesubscript lua_settable
126 133
127#endif 134#endif
135
136#endif