summaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h37
1 files changed, 27 insertions, 10 deletions
diff --git a/lua.h b/lua.h
index f2c19465..577e41c6 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.h,v 1.52 2000/05/10 16:35:18 roberto Exp roberto $ 2** $Id: lua.h,v 1.53 2000/05/24 13:54:49 roberto Exp roberto $
3** Lua - An Extensible Extension Language 3** Lua - An Extensible Extension Language
4** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil 4** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
5** e-mail: lua@tecgraf.puc-rio.br 5** e-mail: lua@tecgraf.puc-rio.br
@@ -101,13 +101,12 @@ lua_Object lua_pop (lua_State *L);
101 101
102lua_Object lua_getglobal (lua_State *L, const char *name); 102lua_Object lua_getglobal (lua_State *L, const char *name);
103void lua_setglobal (lua_State *L, const char *name); /* In: value */ 103void lua_setglobal (lua_State *L, const char *name); /* In: value */
104lua_Object lua_rawgetglobal (lua_State *L, const char *name);
105void lua_rawsetglobal (lua_State *L, const char *name);/* In: value */
106 104
107void lua_settable (lua_State *L); /* In: table, index, value */ 105void lua_settable (lua_State *L); /* In: table, index, value */
108void lua_rawsettable (lua_State *L); /* In: table, index, value */
109lua_Object lua_gettable (lua_State *L); /* In: table, index */ 106lua_Object lua_gettable (lua_State *L); /* In: table, index */
110lua_Object lua_rawgettable (lua_State *L); /* In: table, index */ 107
108void lua_rawset (lua_State *L); /* In: table, index, value */
109lua_Object lua_rawget (lua_State *L); /* In: table, index */
111 110
112int lua_tag (lua_State *L, lua_Object obj); 111int lua_tag (lua_State *L, lua_Object obj);
113 112
@@ -156,7 +155,7 @@ long lua_collectgarbage (lua_State *L, long limit);
156 155
157#ifndef LUA_REENTRANT 156#ifndef LUA_REENTRANT
158/* 157/*
159** =============================================================== 158** {==============================================================
160** Macros for single-state use 159** Macros for single-state use
161** =============================================================== 160** ===============================================================
162*/ 161*/
@@ -205,12 +204,10 @@ extern lua_State *lua_state;
205#define lua_pop() (lua_pop)(lua_state) 204#define lua_pop() (lua_pop)(lua_state)
206#define lua_getglobal(name) (lua_getglobal)(lua_state, name) 205#define lua_getglobal(name) (lua_getglobal)(lua_state, name)
207#define lua_setglobal(name) (lua_setglobal)(lua_state, name) 206#define lua_setglobal(name) (lua_setglobal)(lua_state, name)
208#define lua_rawgetglobal(name) (lua_rawgetglobal)(lua_state, name)
209#define lua_rawsetglobal(name) (lua_rawsetglobal)(lua_state, name)
210#define lua_settable() (lua_settable)(lua_state) 207#define lua_settable() (lua_settable)(lua_state)
211#define lua_rawsettable() (lua_rawsettable)(lua_state)
212#define lua_gettable() (lua_gettable)(lua_state) 208#define lua_gettable() (lua_gettable)(lua_state)
213#define lua_rawgettable() (lua_rawgettable)(lua_state) 209#define lua_rawset() (lua_rawset)(lua_state)
210#define lua_rawget() (lua_rawget)(lua_state)
214#define lua_tag(obj) (lua_tag)(lua_state, obj) 211#define lua_tag(obj) (lua_tag)(lua_state, obj)
215#define lua_next(o,i) (lua_next)(lua_state, o,i) 212#define lua_next(o,i) (lua_next)(lua_state, o,i)
216#define lua_ref(lock) (lua_ref)(lua_state, lock) 213#define lua_ref(lock) (lua_ref)(lua_state, lock)
@@ -225,12 +222,32 @@ extern lua_State *lua_state;
225#define lua_pushcclosure(fn,n) \ 222#define lua_pushcclosure(fn,n) \
226 (lua_pushcclosure)(lua_state, (lua_CFunction)(fn), n) 223 (lua_pushcclosure)(lua_state, (lua_CFunction)(fn), n)
227 224
225
226/*
227** }==============================================================
228*/
228#endif 229#endif
229 230
231/*
232** compatibility with 3.2
233** these functions are only available when Lua is compiled with
234** the option LUA_DEPRECATETFUNCS
235*/
236
237#define lua_rawsettable lua_rawset
238#define lua_rawgettable lua_rawget
239
240lua_Object lua_rawgetglobal (lua_State *L, const char *name);
241void lua_rawsetglobal (lua_State *L, const char *name);/* In: value */
230 242
243#ifndef LUA_REENTRANT
244#define lua_rawgetglobal(name) (lua_rawgetglobal(lua_state, name))
245#define lua_rawsetglobal(name) (lua_rawsetglobal(lua_state, name))
231#endif 246#endif
232 247
233 248
249#endif
250
234 251
235 252
236/****************************************************************************** 253/******************************************************************************