![]() |
Lucciefr
Lua code caving, injection and exploration framework
|
Lua helpers declared as macros. More...
Go to the source code of this file.
Macros | |
| #define | LUA_CFUNC(fname) int fname(lua_State *L) |
| a macro for proper Lua CFunction declarations | |
| #define | LREG_NAME(L, func, name) |
| register a C function for Lua (with a given name string) More... | |
| #define | LREG(L, func) LREG_NAME(L, func, #func) |
| register a C function for Lua, simply using the name of the function | |
| #define | LENUM(L, value) lua_setglobal_int(L, #value, value) |
| register an enum value for Lua, using its name | |
| #define | luaL_error_fname(L, ...) |
| raise Lua error, but auto-prefix message with the function name "%s() " (see http://www.lua.org/manual/5.1/manual.html#luaL_error) More... | |
| #define | LUA_CHECKIDX(L, idx) |
| protect against bad Lua stack index, zero is always invalid More... | |
| #define | LUA_ABSIDX(L, idx) |
| relative Lua stack indices sometimes are hard to maintain, so convert it to an absolute one (when applicable) More... | |
| #define | LUA_CHKABSIDX(L, idx) |
| combine the two macros (LUA_ABSIDX and LUA_CHECKIDX) More... | |
| #define | lua_iscdata(L, index) (lua_type(L, index) == LUA_TCDATA) |
test for FFI <cdata> type | |
| #define | lua_setglobal_int(L, name, value) |
| shortcut for pushinteger + setglobal More... | |
| #define | lua_setglobal_str(L, name, value) |
| shortcut for pushstring + setglobal More... | |
| #define | lua_setglobal_ptr(L, name, value) |
| shortcut for pushlightuserdata + setglobal More... | |
Lua helpers declared as macros.
| #define LREG_NAME | ( | L, | |
| func, | |||
| name | |||
| ) |
register a C function for Lua (with a given name string)
| #define LUA_ABSIDX | ( | L, | |
| idx | |||
| ) |
relative Lua stack indices sometimes are hard to maintain, so convert it to an absolute one (when applicable)
| #define LUA_CHECKIDX | ( | L, | |
| idx | |||
| ) |
protect against bad Lua stack index, zero is always invalid
| #define LUA_CHKABSIDX | ( | L, | |
| idx | |||
| ) |
combine the two macros (LUA_ABSIDX and LUA_CHECKIDX)
| #define lua_setglobal_int | ( | L, | |
| name, | |||
| value | |||
| ) |
shortcut for pushinteger + setglobal
| #define lua_setglobal_ptr | ( | L, | |
| name, | |||
| value | |||
| ) |
shortcut for pushlightuserdata + setglobal
| #define lua_setglobal_str | ( | L, | |
| name, | |||
| value | |||
| ) |
shortcut for pushstring + setglobal
| #define luaL_error_fname | ( | L, | |
| ... | |||
| ) |
raise Lua error, but auto-prefix message with the function name "%s() " (see http://www.lua.org/manual/5.1/manual.html#luaL_error)
1.8.10