lua_type
int t = lua_type(L, idx);
if (lua_type(L, narg) != t)
if (lua_type(L, narg) == LUA_TNONE)
if (lua_type(L, -2) == LUA_TSTRING) { /* ignore non-string keys */
switch (lua_type(L, idx)) {
#define luaL_typename(L,i) lua_typename(L, lua_type(L,(i)))
int t = lua_type(L, 1);
if (lua_type(L, 1) == LUA_TSTRING && *lua_tostring(L, 1) == '#') {
int t = lua_type(L, 2);
int tr = lua_type(L, 3);
if (lua_type(L, -1) == LUA_TNUMBER) {
LUA_API int (lua_type) (lua_State *L, int idx);
#define lua_isfunction(L,n) (lua_type(L, (n)) == LUA_TFUNCTION)
#define lua_istable(L,n) (lua_type(L, (n)) == LUA_TTABLE)
#define lua_islightuserdata(L,n) (lua_type(L, (n)) == LUA_TLIGHTUSERDATA)
#define lua_isnil(L,n) (lua_type(L, (n)) == LUA_TNIL)
#define lua_isboolean(L,n) (lua_type(L, (n)) == LUA_TBOOLEAN)
#define lua_isthread(L,n) (lua_type(L, (n)) == LUA_TTHREAD)
#define lua_isnone(L,n) (lua_type(L, (n)) == LUA_TNONE)
#define lua_isnoneornil(L, n) (lua_type(L, (n)) <= 0)
type = lua_type(state, -1);
type = lua_type(state, -1);
type = lua_type(state, i + 1);
switch (lua_type(state, -2)) {
lua_typename(state, lua_type(state, -2)));
switch (lua_type(state, index)) {
lua_typename(state, lua_type(state, index)), key);