function luaU.ttype(u,y)local l=type(y.value)if l=="\110\117\109\098\101\114"then return u.LUA_TNUMBER elseif l=="\115\116\114\105\110\103"then return u.LUA_TSTRING elseif l=="\110\105\108"then return u.LUA_TNIL elseif l=="\098\111\111\108\101\097\110"then return u.LUA_TBOOLEAN else return u.LUA_TNONE end end
------------------------------------------------------------------------
-- works like the lobject.h version except that TObject used in these
-- scripts only has a 'value' field, no 'tt' field (native types used)
------------------------------------------------------------------------
function luaU:ttype(o)
	local tt = type(o.value)
	if tt == "number" then
		return self.LUA_TNUMBER
	elseif tt == "string" then
		return self.LUA_TSTRING
	elseif tt == "nil" then
		return self.LUA_TNIL
	elseif tt == "boolean" then
		return self.LUA_TBOOLEAN
	else
		return self.LUA_TNONE -- the rest should not appear
	end
end
