Sasha Szpakowski
6aaf0b22bf
Address some compiler warnings
2023-10-21 13:55:43 -03:00
Sasha Szpakowski
6e80d85110
Merge branch 'main' into 12.0-development
2023-08-19 21:35:55 -03:00
ImagicTheCat
22e68868e1
Fix/improve SHA-384/512 hashing.
2023-05-24 16:29:23 +02:00
ImagicTheCat
ade382072d
Fix/improve SHA-224/256 hashing.
2023-05-24 16:10:53 +02:00
ImagicTheCat
4304132f8f
Fix/improve SHA1 hashing.
2023-05-24 16:09:34 +02:00
ImagicTheCat
f1a5e47aae
Fix/improve MD5 hashing.
2023-05-24 16:08:27 +02:00
Sasha Szpakowski
abf9980cc2
Fix ByteData:set* error message.
2023-02-20 10:06:09 -04:00
Sasha Szpakowski
bec488519d
Add a variant of love.data.pack which takes an existing ByteData object.
...
#1594
2023-02-19 22:15:07 -04:00
Sasha Szpakowski
1909e80409
Add ByteData:setString.
2023-02-19 20:26:35 -04:00
Sasha Szpakowski
78de7bdf3c
Move ByteData float/int getter methods to Data.
2023-02-19 19:52:07 -04:00
Sasha Szpakowski
139c68d197
better error checking for Data:getString's size parameter.
2023-02-13 19:41:25 -04:00
Sasha Szpakowski
f6416dd584
Add optional byte offset and size parameters to Data:getString.
2023-02-13 19:39:31 -04:00
Sasha Szpakowski
02e8acc0d2
Add ByteData methods for getting/setting number values.
...
See #1594
2023-02-13 19:37:59 -04:00
Sasha Szpakowski
95d44c2c2d
very minor compile speed improvements
2023-02-11 16:29:24 -04:00
Sasha Szpakowski
f6cdbdc868
Merge branch 'main' into 12.0-development
2022-12-31 22:46:34 -04:00
Sasha Szpakowski
0b75f6cfa5
Missed some files...
2022-12-31 22:36:48 -04:00
Sasha Szpakowski
c823dbca96
Update copyright year for 2023
2022-12-31 22:25:49 -04:00
Alex Szpakowski
69c4a496dd
Fix a few minor compiler warnings
2022-06-18 17:59:55 -03:00
Alex Szpakowski
1e85893abb
Add new DataStream subclass of Stream, internal-only for now.
2022-04-21 19:52:46 -03:00
Alex Szpakowski
ceb23eee48
Add new Stream base class, internal-only for now.
2022-04-21 19:52:04 -03:00
Alex Szpakowski
7f3538d2ba
Merge branch 'main' into 12.0-development
2022-01-05 21:10:27 -04:00
Alex Szpakowski
8e7fd10b6f
Update copyright year for 2022
2021-12-31 18:33:40 -04:00
Alex Szpakowski
52101b2563
Add love.graphics.copyTextureToBuffer and copyBufferToTexture.
2021-12-28 12:46:56 -04:00
Alex Szpakowski
c8038f22df
Merge branch 'main' into 12.0-development
2021-12-24 11:35:35 -04:00
Alex Szpakowski
ebd5f13456
Fix missing ByteData:clone and DataView:clone implementations.
...
Fixes #1754
2021-12-07 19:51:40 -04:00
Alex Szpakowski
9b4aea8f17
Missed some copyright date updates
2021-04-07 20:34:24 -03:00
Alex Szpakowski
21f5ba86d3
Merge branch 'master' into 12.0-development
2021-04-07 20:33:44 -03:00
Alex Szpakowski
f89aabb0bb
Update copyright year for 2021
2021-04-04 16:14:45 -03:00
Alex Szpakowski
fc4847c69d
Update copyright for the new year
2020-01-03 22:40:36 -04:00
Alex Szpakowski
cb4b45dcf1
Add Data:getFFIPointer. Similar to Data:getPointer but returns a cdata pointer directly (or nil if the FFI isn't available).
...
It should be preferred instead of Data:getPointer because the latter uses lightuserdata which can't store more all possible memory addresses on some new arm64 architectures, when LuaJIT is used.
2019-07-20 10:47:58 -03:00
Bart van Strien
3d64ad0a3e
Properly propagate errors when creating a DataView ( fixes #1476 )
...
The C++ code already threw an exception when creating a DataView with size 0, but the corresponding lua wrapper ignored it. Now it's correctly turned into a lua error.
2019-03-02 13:47:49 +01:00
Alex Szpakowski
0752f27bdf
Update copyright year for 2019
2019-01-03 21:09:05 -04:00
Alex Szpakowski
5d5c2f9a96
math and data module instances are now deleted when they have no more Lua references (matches the behaviour of other modules.) Fixes the deprecation system not fully restarting when love.event.quit("restart") is called.
...
Resolves issue #1462 .
2018-12-17 16:44:13 -04:00
Alex Szpakowski
2e190f4fa0
Merged in PabloMayobre/love-1/PabloMayobre/fixed-hash-functions-in-data-module-not--1543171550077 (pull request #117 )
...
Fixed hash functions in data module
Approved-by: Bart van Strien <bart.bes+projects@gmail.com >
Approved-by: Tae Hanazono <auahdark687291@gmail.com >
2018-12-06 21:50:18 +00:00
Pablo Mayobre
ed68ac6b28
Fix hash functions. The length appended at the end was the modified length (taking into consideration the appended bit) instead of the original length as it should be.
...
--HG--
branch : PabloMayobre/fixed-hash-functions-in-data-module-not--1543171550077
2018-11-30 03:54:58 +00:00
Michael Vetter
a1d6da4624
Silence compiler warning
...
Silence compiler warnings about methods with return value and potentially not returning anything.
This happens with gcc8 and the `-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -std=c++11` flags passed to it by default on openSUSE.
2018-11-29 17:07:20 +01:00
Pablo Mayobre
43633d7b44
Fix typo: paddedlength -> paddedLength
...
--HG--
branch : PabloMayobre/fixed-hash-functions-in-data-module-not--1543171550077
2018-11-25 19:03:30 +00:00
Pablo Mayobre
7c1603537f
Fixed hash functions in data module, not taking the appended 1bit into consideration when calculating padding length. Fixes #1453
...
--HG--
branch : PabloMayobre/fixed-hash-functions-in-data-module-not--1543171550077
2018-11-25 18:46:33 +00:00
Alex Szpakowski
33177c9826
Fix the explicit format + Data argument variant of love.data.decompress.
2018-05-13 12:12:29 -03:00
Alex Szpakowski
3a2ffc5e07
Add support for header-less DEFLATE data to love.data.compress/decompress.
2018-02-24 22:28:58 -04:00
Alex Szpakowski
68f561dcc7
Fix love.data.decompress when passing in a CompressedData.
2018-01-08 15:34:46 +00:00
Bart van Strien
e80247c191
Happy new year! ✨
2018-01-03 19:47:35 +01:00
Alex Szpakowski
0b7cb4a353
Add variants of File:read and love.filesystem.read which take an enum to determine whether they return a FileData or string.
2017-12-22 16:32:54 -04:00
Alex Szpakowski
9fa73f8b87
Several love.data functions now take an enum ("data" or "string") to determine whether they return a Data object or a string.
...
Changed functions are love.data.compress, decompress, encode, decode, and pack.
2017-12-22 16:13:20 -04:00
Alex Szpakowski
cdcf052a73
Update LZ4.
2017-12-17 21:52:19 -04:00
Bart van Strien
9e4374935d
Show (short) list of possible enum values when an invalid value is encountered ( resolves #1318 )
...
All enum errors have (hopefully) been changed to a luax_enumerror, which has a
fixed error message. If additionally a list of valid options is passed, it
lists that in the error message. For every enum error with few options I've
implemented this using a getConstants call.
This solution has been designed specifically to reduce the number of template
instantiations (as I've been told that was a concern). All new template code
happens in places where there already was an instantiation of the relevant
StringMap. Of course there is still std::vector<std::string>...
--HG--
branch : minor
2017-10-02 17:11:53 +02:00
Alex Szpakowski
90e86c329d
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
2017-09-24 19:25:27 -03:00