1
0
mirror of https://git.tukaani.org/xz.git synced 2025-10-05 16:58:17 +00:00

liblzma: Document that lzma_allocator.free(opaque, NULL) is possible

It feels better to fix the docs than change the code because this
way newly-written applications will be forced to be compatible with
the lzma_allocator behavior of old liblzma versions. It can matter
if someone builds the application against an older liblzma version.

Fixes: https://github.com/tukaani-project/xz/issues/183
This commit is contained in:
Lasse Collin 2025-09-29 18:37:19 +03:00
parent 6d287a3ae9
commit 61b114e92f
No known key found for this signature in database
GPG Key ID: 38EE757D69184620

View File

@ -450,7 +450,9 @@ typedef struct {
* \param opaque lzma_allocator.opaque (see below)
* \param ptr Pointer returned by lzma_allocator.alloc(),
* or when it is set to NULL, a pointer returned
* by the standard malloc().
* by the standard malloc(). In addition, NULL
* is a possible value. The function should do
* nothing when ptr == NULL.
*/
void (LZMA_API_CALL *free)(void *opaque, void *ptr);