Add love.data module.

- Moved love.math.compress / decompress / decode / encode / hash to love.data.
- Changed love.data.compress/decompress to take the format argument first instead of second.
- Added love.data.newDataView. Returns a read-only subsection of an existing Data object.
- Added love.data.newByteData. Mostly useful in combination with LuaJIT's FFI as it has no extra methods currently.
- Added implementations of Lua 5.3's data packing APIs: love.data.packString / packData / unpack / getPackedSize.

Resolves issue #1336.
Resolves issue #1331.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-09-24 19:25:27 -03:00
parent bdf961e174
commit 90e86c329d
50 changed files with 2182 additions and 545 deletions
+2 -2
View File
@@ -20,7 +20,7 @@
#include "wrap_FileData.h"
#include "common/wrap_Data.h"
#include "data/wrap_Data.h"
namespace love
{
@@ -66,7 +66,7 @@ static const luaL_Reg w_FileData_functions[] =
extern "C" int luaopen_filedata(lua_State *L)
{
return luax_register_type(L, &FileData::type, w_Data_functions, w_FileData_functions, nullptr);
return luax_register_type(L, &FileData::type, data::w_Data_functions, w_FileData_functions, nullptr);
}
} // filesystem