Commit Graph

3 Commits

Author SHA1 Message Date
Xavier Del Campo Romero 9e183ec0a6 64-bit support, C11 as requirement and other improvements
- C11 support is required (although only on serializer.c, so the check has
been moved there) since _Alignof is needed.
- Added support for little/big endian 64-bit integers.
- swap16, swap32 and swap64 now cast pointers to (uint8_t *) and (const uint8_t *)
from the argument list so the explicit casts are no longer needed.
2020-05-20 14:35:59 +02:00
Xavier Del Campo Romero 71a3db14a5 Various bugfixes and improvements
- Fixed wrong return type from swap16() and swap32().
- Padding must be calculated according to alignment rules (given by
_Alignof), not type size. While that would work on 32-bit CPUs, it
might fail on 8-bit or 16-bit CPUs.
- Added extra parentheses on assignment in while loop to avoid compiler warning.
2020-05-04 16:45:54 +02:00
Xavi Del Campo c3f0add4d3 First commit 2020-04-29 19:41:52 +02:00