diff options
Diffstat (limited to 'lua.h')
| -rw-r--r-- | lua.h | 18 |
1 files changed, 9 insertions, 9 deletions
| @@ -149,7 +149,6 @@ LUA_API void lua_pushboolean (lua_State *L, int b); | |||
| 149 | /* | 149 | /* |
| 150 | ** get functions (Lua -> stack) | 150 | ** get functions (Lua -> stack) |
| 151 | */ | 151 | */ |
| 152 | LUA_API void lua_getstr (lua_State *L, int index, const char *name); | ||
| 153 | LUA_API void lua_gettable (lua_State *L, int index); | 152 | LUA_API void lua_gettable (lua_State *L, int index); |
| 154 | LUA_API void lua_rawget (lua_State *L, int index); | 153 | LUA_API void lua_rawget (lua_State *L, int index); |
| 155 | LUA_API void lua_rawgeti (lua_State *L, int index, int n); | 154 | LUA_API void lua_rawgeti (lua_State *L, int index, int n); |
| @@ -160,7 +159,6 @@ LUA_API void lua_getmetatable (lua_State *L, int objindex); | |||
| 160 | /* | 159 | /* |
| 161 | ** set functions (stack -> Lua) | 160 | ** set functions (stack -> Lua) |
| 162 | */ | 161 | */ |
| 163 | LUA_API void lua_setstr (lua_State *L, int index, const char *name); | ||
| 164 | LUA_API void lua_settable (lua_State *L, int index); | 162 | LUA_API void lua_settable (lua_State *L, int index); |
| 165 | LUA_API void lua_rawset (lua_State *L, int index); | 163 | LUA_API void lua_rawset (lua_State *L, int index); |
| 166 | LUA_API void lua_rawseti (lua_State *L, int index, int n); | 164 | LUA_API void lua_rawseti (lua_State *L, int index, int n); |
| @@ -232,13 +230,6 @@ LUA_API void lua_newuserdatabox (lua_State *L, void *u); | |||
| 232 | #define lua_pushliteral(L, s) lua_pushlstring(L, "" s, \ | 230 | #define lua_pushliteral(L, s) lua_pushlstring(L, "" s, \ |
| 233 | (sizeof(s)/sizeof(char))-1) | 231 | (sizeof(s)/sizeof(char))-1) |
| 234 | 232 | ||
| 235 | #define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) | ||
| 236 | #define lua_getglobals(L) lua_pushvalue(L, LUA_GLOBALSINDEX) | ||
| 237 | #define lua_setglobals(L) lua_replace(L, LUA_GLOBALSINDEX) | ||
| 238 | #define lua_getglobal(L,s) lua_getstr(L, LUA_GLOBALSINDEX, s) | ||
| 239 | #define lua_setglobal(L,s) lua_setstr(L, LUA_GLOBALSINDEX, s) | ||
| 240 | |||
| 241 | |||
| 242 | 233 | ||
| 243 | /* | 234 | /* |
| 244 | ** compatibility macros and functions | 235 | ** compatibility macros and functions |
| @@ -246,6 +237,15 @@ LUA_API void lua_newuserdatabox (lua_State *L, void *u); | |||
| 246 | 237 | ||
| 247 | LUA_API int lua_pushupvalues (lua_State *L); | 238 | LUA_API int lua_pushupvalues (lua_State *L); |
| 248 | 239 | ||
| 240 | #define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) | ||
| 241 | #define lua_getglobals(L) lua_pushvalue(L, LUA_GLOBALSINDEX) | ||
| 242 | #define lua_setglobals(L) lua_replace(L, LUA_GLOBALSINDEX) | ||
| 243 | #define lua_setglobal(L,s) \ | ||
| 244 | (lua_pushstring(L, s), lua_insert(L, -2), lua_settable(L, LUA_GLOBALSINDEX)) | ||
| 245 | |||
| 246 | #define lua_getglobal(L,s) \ | ||
| 247 | (lua_pushstring(L, s), lua_gettable(L, LUA_GLOBALSINDEX)) | ||
| 248 | |||
| 249 | #define lua_isnull lua_isnone | 249 | #define lua_isnull lua_isnone |
| 250 | 250 | ||
| 251 | 251 | ||
