Jasmijn Wellner
8ccc5fb206
Add support for LuaRocks
...
See https://luarocks.org/modules/gvx/bitser
2025-01-01 15:08:44 +01:00
Jasmijn Wellner
4545391591
Release 1.2
...
It has been long overdue. Let's serialize the world!
Some important changes since 1.1:
- Can serialize metatables now (optionally disabled with `bitser.includeMetatables`)
- Added an extension API
- Removed support for cdata, which was just too buggy to hold on. More robust support would probably need to depend on ffi-reflect, which is best done by an extension library
2024-12-31 10:47:08 +01:00
Jasmijn Wellner
c0b0e12dce
Fix bug #33 by changing the contract
...
"Pray I do not alter it any further."
On a serious note, I could not find a good reason to keep the old behaviour. It was niche at best, and class libraries tend to ultimately depend on `setmetatable` anyway, which just returns the original table, which has been mutated.
Now the return value of `deserializer` is simply ignored, and it is presumed the original table *is* the instance.
2024-12-31 10:36:41 +01:00
Jasmijn Wellner
5d11626898
Add rockspec
2024-12-31 10:14:22 +01:00
Jasmijn Wellner
5e24a79b09
Test under LuaJIT 2.1 instead of 2.0
2024-12-30 16:09:26 +01:00
Jasmijn Wellner
c9db225486
Add support for an any number of additional types
...
Type code 255 will be followed by an encoded number, which signifies the additional type code. No additional types are specified at the moment.
2024-12-29 20:51:45 +01:00
Jasmijn Wellner
71d2d7d73f
Add an extension for #24
...
This is only a simplified system. A full implementation would need to add support for nested keys, and also support the same set of class libraries that bitser does.
2024-12-29 19:33:44 +01:00
Jasmijn Wellner
3d259bb196
Mention support for Classic in documentation
2024-12-29 17:56:55 +01:00
Jasmijn Wellner
3fd140cb28
Add a test for rxi/classic
2024-12-29 17:54:42 +01:00
Jasmijn Wellner
608c1c4792
Add a test for recursive instances
...
Currently they are not supported (previously they would silently give potentially wrong output)
2024-12-29 17:29:36 +01:00
Jasmijn Wellner
8bfdf3a961
Add back in tests for types 251 and 252
...
They were previously used for cdata and ctypes
2024-12-29 17:20:51 +01:00
Jasmijn Wellner
4ca78ad394
Update test.sh
2024-12-29 16:02:15 +01:00
Jasmijn Wellner
74a2359cd6
Merge branch 'extensions'
2024-12-29 16:02:00 +01:00
Jasmijn Wellner
4591cc1cd3
Update README
...
- remove build status and coverage status (RIP)
- add warning re endianness
2024-12-29 15:05:03 +01:00
Jasmijn Wellner
a6319ec76e
Delete .travis.yml
...
No more Travis CI :(
2024-12-29 14:51:28 +01:00
Jasmijn Wellner
42c2603c67
Create test.sh
2024-12-29 14:50:57 +01:00
Jasmijn Wellner
005a10c0a1
Update .gitignore
2024-12-29 14:50:42 +01:00
Jasmijn Wellner
6ef94ea0be
Create setuptest.sh
2024-12-29 14:50:01 +01:00
Jasmijn Wellner
c95cb0d77a
Remove cdata support
...
See https://github.com/gvx/bitser/issues/28#issuecomment-2564723498
2024-12-29 14:28:04 +01:00
Jasmijn Wellner
f423938ec0
Silence warnings
2024-12-28 17:10:38 +01:00
Jasmijn Wellner
a835305539
Fix syntax error
2024-12-28 17:09:57 +01:00
Jasmijn Wellner
5d9ff6fa1a
Trying to deal with bug #33
2024-12-28 16:44:44 +01:00
Jasmijn Wellner
493bc00af8
Reduce copying of buffer when reserving
2024-12-28 16:19:02 +01:00
Jasmijn Wellner
0742c8d878
Create .gitignore
2024-12-28 16:12:16 +01:00
R.E.J. Wellner
98ec31d243
Create LICENSE.txt
2022-07-01 15:57:38 +02:00
R.E.J. Wellner
16d13ece9d
Fix #30 by adding ISC license file
2022-07-01 15:55:16 +02:00
R.E.J. Wellner
c8ed0456e6
Missed a mention of disable_extensions!
2021-03-30 17:22:37 +02:00
R.E.J. Wellner
1fc6c6171c
Add initial version of the extension API
2021-03-30 17:14:14 +02:00
Adrien Bertrand
1d3ebe04cf
metatables: feature to toggle (de)serializing them. Fix #21 . ( #22 )
2021-02-14 18:53:02 +00:00
Jasmijn Wellner
66042a5b09
Fix Slither test
...
Slither no longer requires class.private.
2020-12-26 15:20:06 +01:00
Jasmijn Wellner
c08f169e91
Do not try to serialize metatables for class instances
2020-12-26 15:15:53 +01:00
Jasmijn Wellner
f6e78d0c2a
Update tests
...
253 is no longer unassigned
2020-12-26 15:00:06 +01:00
Jasmijn Wellner
54a3c9e711
Update slither url
...
Let's make sure those builds succeed!
2020-12-26 14:32:19 +01:00
Jasmijn Wellner
02476589e3
Add ability to serialize metatables
2020-12-26 14:22:57 +01:00
Jasmijn Wellner
d30f0c7aca
Fixed #18
...
Bug was that Buffer_newDataReader() assumed buf is always writable,
which isn't the case after reading from a static buffer. Added a
separate flag to describe the nature of buf.
2020-12-26 13:58:14 +01:00
R.E.J. Wellner
884aa8bdc6
Release version 1.1
2020-04-29 20:37:17 +02:00
R.E.J. Wellner
1a9f3d7631
Don't add cdata to seen!
2020-04-29 01:42:38 +02:00
R.E.J. Wellner
cd6ac6f7cb
will this work?
...
at this point, i don't even hope any more
2020-04-28 17:15:06 +02:00
R.E.J. Wellner
776b056d69
either i don't understand luaspec
...
or i'm losing my mind
2020-04-28 17:11:46 +02:00
R.E.J. Wellner
772f090413
Change tests again
...
Would be useful if I could run luaspec locally but oh well
2020-04-28 17:03:33 +02:00
R.E.J. Wellner
b7cc46f4bf
Fix one of the tests
2020-04-28 16:56:11 +02:00
R.E.J. Wellner
caf972ca80
Add support for cdata
...
More testing needed
2020-04-28 16:51:41 +02:00
R.E.J. Wellner
5a134b4fce
Close #13
...
Turns out I never fixed this one bug...
2020-04-27 19:47:09 +02:00
Robin Wellner
214ad35f62
Fix #1 with the solution by @pgimeno
2018-11-30 13:17:27 +00:00
Robin Wellner
e817e4de28
Close #12 (serialization bug for string "len")
...
Thanks to nikki93 for spotting the issue and suggesting this solution.
2018-11-04 13:07:19 +00:00
Robert Machmer
4f2680317c
Add assertions for dumpLoveFile and loadLoveFile ( #11 )
...
This will print useful error messages instead of just failing silently.
E.g.:
`lib/Bitser.lua:370: Could not open file prabs/test.lua. Does not exist.`
2018-02-20 18:38:47 +01:00
Robin Wellner
dd3034117f
Return true in mock write so asserts work
2018-02-20 15:24:17 +01:00
Robert Machmer
65107f15c0
Fix travis build ( #10 )
2018-02-20 15:15:46 +01:00
Robin Wellner
e7480da28e
Add note about JIT to readme
...
Hopefully resolves #8
2017-03-29 14:50:09 +02:00
Robin Wellner
b2365c4c0c
Update USAGE.md
2017-01-10 14:38:59 +01:00