示例#1
0
文件: c-golua.c 项目: Archs/golua
unsigned int* clua_checkgosomething(lua_State* L, int index, const char *desired_metatable)
{
	if (desired_metatable != NULL)
	{
		return testudata(L, index, desired_metatable);
	}
	else
	{
		unsigned int *sid = testudata(L, index, MT_GOFUNCTION);
		if (sid != NULL) return sid;
		return testudata(L, index, MT_GOINTERFACE);
	}
}
示例#2
0
文件: c-golua.c 项目: Archs/golua
int clua_isgofunction(lua_State *L, int n)
{
	return testudata(L, n, MT_GOFUNCTION) != NULL;
}
示例#3
0
文件: c-golua.c 项目: Archs/golua
int clua_isgostruct(lua_State *L, int n)
{
	return testudata(L, n, MT_GOINTERFACE) != NULL;
}
示例#4
0
bool is_exception(lua_State * L, int i) {
    return testudata(L, i, exception_mt);
}