aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-02-05 20:35:58 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-02-05 20:35:58 -0200
commit0a87d9d3346bcf74d84e4d6bae775bceecef096f (patch)
treee81f26ef510ce349fe1ad6008c888e919c35d074 /lua.h
parentf856fdeabde61ee2f020d5fea799e4f5cd85cb44 (diff)
downloadlua-0a87d9d3346bcf74d84e4d6bae775bceecef096f.tar.gz
lua-0a87d9d3346bcf74d84e4d6bae775bceecef096f.tar.bz2
lua-0a87d9d3346bcf74d84e4d6bae775bceecef096f.zip
new function `lua_replace'
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lua.h b/lua.h
index 776f0e36..0845a386 100644
--- a/lua.h
+++ b/lua.h
@@ -108,6 +108,7 @@ LUA_API void lua_settop (lua_State *L, int index);
108LUA_API void lua_pushvalue (lua_State *L, int index); 108LUA_API void lua_pushvalue (lua_State *L, int index);
109LUA_API void lua_remove (lua_State *L, int index); 109LUA_API void lua_remove (lua_State *L, int index);
110LUA_API void lua_insert (lua_State *L, int index); 110LUA_API void lua_insert (lua_State *L, int index);
111LUA_API void lua_replace (lua_State *L, int index);
111LUA_API int lua_stackspace (lua_State *L); 112LUA_API int lua_stackspace (lua_State *L);
112 113
113 114
@@ -163,7 +164,6 @@ LUA_API void lua_setstr (lua_State *L, int index, const char *name);
163LUA_API void lua_settable (lua_State *L, int index); 164LUA_API void lua_settable (lua_State *L, int index);
164LUA_API void lua_rawset (lua_State *L, int index); 165LUA_API void lua_rawset (lua_State *L, int index);
165LUA_API void lua_rawseti (lua_State *L, int index, int n); 166LUA_API void lua_rawseti (lua_State *L, int index, int n);
166LUA_API void lua_setglobals (lua_State *L);
167LUA_API void lua_setmetatable (lua_State *L, int objindex); 167LUA_API void lua_setmetatable (lua_State *L, int objindex);
168 168
169 169
@@ -186,7 +186,7 @@ LUA_API int lua_dobuffer (lua_State *L, const char *buff, size_t size,
186*/ 186*/
187LUA_API void lua_cobegin (lua_State *L, int nargs); 187LUA_API void lua_cobegin (lua_State *L, int nargs);
188LUA_API int lua_yield (lua_State *L, int nresults); 188LUA_API int lua_yield (lua_State *L, int nresults);
189LUA_API void lua_resume (lua_State *L, lua_State *co); 189LUA_API int lua_resume (lua_State *L, lua_State *co);
190 190
191/* 191/*
192** Garbage-collection functions 192** Garbage-collection functions
@@ -234,6 +234,7 @@ LUA_API void lua_newuserdatabox (lua_State *L, void *u);
234 234
235#define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) 235#define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX)
236#define lua_getglobals(L) lua_pushvalue(L, LUA_GLOBALSINDEX) 236#define lua_getglobals(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
237#define lua_setglobals(L) lua_replace(L, LUA_GLOBALSINDEX)
237#define lua_getglobal(L,s) lua_getstr(L, LUA_GLOBALSINDEX, s) 238#define lua_getglobal(L,s) lua_getstr(L, LUA_GLOBALSINDEX, s)
238#define lua_setglobal(L,s) lua_setstr(L, LUA_GLOBALSINDEX, s) 239#define lua_setglobal(L,s) lua_setstr(L, LUA_GLOBALSINDEX, s)
239 240