Put the custom allocator in its own lib, as to lessen the difficulty to switch between libc's allocator and a custom one (#7)

This commit is contained in:
Maix0 2024-05-14 18:56:53 +02:00 committed by GitHub
parent 713f0f0302
commit cb7f3c3fdf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
85 changed files with 1121 additions and 877 deletions

View file

@ -64,7 +64,7 @@ See the function declaration below for the signature and more information.
If you don't want/need the qoi_read and qoi_write functions, you can define
QOI_NO_STDIO before including this library.
This library uses malloc() and me_free(). To supply your own malloc implementation
This library uses malloc() and mem_free(). To supply your own malloc implementation
you can define QOI_MALLOC and QOI_FREE before including this library.
This library uses memset() to zero-initialize the index. To supply your own
@ -273,7 +273,7 @@ The function either returns NULL on failure (invalid data, or malloc or fopen
failed) or a pot_i32er to the decoded pixels. On success, the t_qoi_desc struct
will be filled with the description from the file header.
The returned pixel data should be me_free()d after use. */
The returned pixel data should be mem_free()d after use. */
void *qoi_read(t_const_str filename, t_qoi_desc *desc,
t_i32 channels);
@ -286,7 +286,7 @@ The function either returns NULL on failure (invalid parameters or malloc
failed) or a pot_i32er to the encoded data on success. On success the out_len
is set to the size in bytes of the encoded data.
The returned qoi data should be me_free()d after use. */
The returned qoi data should be mem_free()d after use. */
void *qoi_encode(const void *data, const t_qoi_desc *desc,
t_i32 *out_len);
@ -297,7 +297,7 @@ The function either returns NULL on failure (invalid parameters or malloc
failed) or a pot_i32er to the decoded pixels. On success, the t_qoi_desc struct
is filled with the description from the file header.
The returned pixel data should be me_free()d after use. */
The returned pixel data should be mem_free()d after use. */
void *qoi_decode(const void *data, t_i32 size, t_qoi_desc *desc,
t_i32 channels);