0.10.0 (2022-12-29)
- Make the buffer_size optional in
cbor_serialize_alloc
[#205] (by hughsie) - BREAKING: Improved half-float encoding for denormalized numbers. [#208] (by ranvis)
- Denormalized half-floats will now preserve data in the mantissa
- Note: Half-float NaNs still lose data (#215)
- BUILD BREAKING: Minimum CMake version is 3.0 [#201] (by thewtex@)
- See https://repology.org/project/cmake/versions for support; the vast majority of users should not be affected.
- Fix a potential memory leak when the allocator fails during array or map decoding [#224] (by James-ZHANG)
- Fix a memory leak when the allocator fails when adding chunks to indefinite bytestrings. (discovered by James-ZHANG)
- Fix a memory leak when the allocator fails when adding chunks to indefinite strings
- Potentially BUILD BREAKING: Add nodiscard attributes to most functions
- Warning: This may cause new build warnings and (in rare cases, depending on your configuration) errors
- BREAKING: Fix
cbor_copy
leaking memory and creating invalid items when the allocator fails.- Previously, the failures were not handled in the interface. Now,
cbor_copy
may returnNULL
upon failure; clients should check the return value
- Previously, the failures were not handled in the interface. Now,
- Fix
cbor_build_tag
illegal memory behavior when the allocator fails - Add a new
cbor_serialized_size
API - Reworked
cbor_serialize_alloc
to allocate the exact amount of memory necessary upfront- This should significantly speed up
cbor_serialize_alloc
for large items by avoiding multiple reallocation iterations - Clients should not use the return value of
cbor_serialize_alloc
. It may be removed in the future.
- This should significantly speed up
- BUILD BREAKING: Deprecate CBOR_CUSTOM_ALLOC
cbor_set_allocs
will always be enabled from now on- Note: The flag will be kept as a no-op triggering a warning when used for one version and then removed completely