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); } }
int clua_isgofunction(lua_State *L, int n) { return testudata(L, n, MT_GOFUNCTION) != NULL; }
int clua_isgostruct(lua_State *L, int n) { return testudata(L, n, MT_GOINTERFACE) != NULL; }
bool is_exception(lua_State * L, int i) { return testudata(L, i, exception_mt); }