Exemple #1
0
static int w__typeOf(lua_State *L)
{
    Proxy *p = (Proxy *)lua_touserdata(L, 1);
    Type t = luax_type(L, 2);
    luax_pushboolean(L, p->flags[t]);
    return 1;
}
Exemple #2
0
static int w__typeOf(lua_State *L)
{
	Proxy *p = (Proxy *)lua_touserdata(L, 1);
	Type *t = luax_type(L, 2);
	if (!t)
		luax_pushboolean(L, false);
	else
		luax_pushboolean(L, p->type->isa(*t));
	return 1;
}