aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-12-10 20:09:51 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-12-10 20:09:51 -0200
commit9cd36059ad6f3f6750b8cff54c305ae347c6caca (patch)
tree6b71bb5dab3c7f1e8fec12bc03830b58cdc59fc0 /lua.h
parent592a309177edc52847b1196969ad6d49ba21f4fb (diff)
downloadlua-9cd36059ad6f3f6750b8cff54c305ae347c6caca.tar.gz
lua-9cd36059ad6f3f6750b8cff54c305ae347c6caca.tar.bz2
lua-9cd36059ad6f3f6750b8cff54c305ae347c6caca.zip
new API functions lua_getstr/lua_setstr
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/lua.h b/lua.h
index 5c63a770..fd7efb04 100644
--- a/lua.h
+++ b/lua.h
@@ -146,7 +146,7 @@ LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n);
146/* 146/*
147** get functions (Lua -> stack) 147** get functions (Lua -> stack)
148*/ 148*/
149LUA_API void lua_getglobal (lua_State *L, const char *name); 149LUA_API void lua_getstr (lua_State *L, int index, const char *name);
150LUA_API void lua_gettable (lua_State *L, int index); 150LUA_API void lua_gettable (lua_State *L, int index);
151LUA_API void lua_rawget (lua_State *L, int index); 151LUA_API void lua_rawget (lua_State *L, int index);
152LUA_API void lua_rawgeti (lua_State *L, int index, int n); 152LUA_API void lua_rawgeti (lua_State *L, int index, int n);
@@ -158,7 +158,7 @@ LUA_API void lua_geteventtable (lua_State *L, int objindex);
158/* 158/*
159** set functions (stack -> Lua) 159** set functions (stack -> Lua)
160*/ 160*/
161LUA_API void lua_setglobal (lua_State *L, const char *name); 161LUA_API void lua_setstr (lua_State *L, int index, const char *name);
162LUA_API void lua_settable (lua_State *L, int index); 162LUA_API void lua_settable (lua_State *L, int index);
163LUA_API void lua_rawset (lua_State *L, int index); 163LUA_API void lua_rawset (lua_State *L, int index);
164LUA_API void lua_rawseti (lua_State *L, int index, int n); 164LUA_API void lua_rawseti (lua_State *L, int index, int n);
@@ -227,8 +227,10 @@ LUA_API int lua_getweakmode (lua_State *L, int index);
227#define lua_pushliteral(L, s) lua_pushlstring(L, "" s, \ 227#define lua_pushliteral(L, s) lua_pushlstring(L, "" s, \
228 (sizeof(s)/sizeof(char))-1) 228 (sizeof(s)/sizeof(char))-1)
229 229
230#define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX); 230#define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX)
231#define lua_getglobals(L) lua_pushvalue(L, LUA_GLOBALSINDEX); 231#define lua_getglobals(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
232#define lua_getglobal(L,s) lua_getstr(L, LUA_GLOBALSINDEX, s)
233#define lua_setglobal(L,s) lua_setstr(L, LUA_GLOBALSINDEX, s)
232 234
233 235
234 236