Lines Matching refs:tname
182 static int typeerror (lua_State *L, int arg, const char *tname) {
191 msg = lua_pushfstring(L, "%s expected, got %s", tname, typearg);
299 LUALIB_API int luaL_newmetatable (lua_State *L, const char *tname) {
300 if (luaL_getmetatable(L, tname) != LUA_TNIL) /* name already in use? */
304 lua_pushstring(L, tname);
305 lua_setfield(L, -2, "__name"); /* metatable.__name = tname */
307 lua_setfield(L, LUA_REGISTRYINDEX, tname); /* registry.name = metatable */
312 LUALIB_API void luaL_setmetatable (lua_State *L, const char *tname) {
313 luaL_getmetatable(L, tname);
318 LUALIB_API void *luaL_testudata (lua_State *L, int ud, const char *tname) {
322 luaL_getmetatable(L, tname); /* get correct metatable */
333 LUALIB_API void *luaL_checkudata (lua_State *L, int ud, const char *tname) {
334 void *p = luaL_testudata(L, ud, tname);
335 if (p == NULL) typeerror(L, ud, tname);