diff options
| author | Nakidai <nakidai@disroot.org> | 2024-11-24 19:48:43 +0300 |
|---|---|---|
| committer | Nakidai <nakidai@disroot.org> | 2024-11-24 19:48:43 +0300 |
| commit | 786472f41bc2a7db3bd271fccaaff57fc74b6989 (patch) | |
| tree | c4fa78bb53ce9fe91d0eefdc804217e365241cb9 /include/libhttpc.h | |
| parent | a9ae6f4844ae4ac0baa78605157a111aad9358b8 (diff) | |
| download | libhttpc-786472f41bc2a7db3bd271fccaaff57fc74b6989.tar.gz libhttpc-786472f41bc2a7db3bd271fccaaff57fc74b6989.zip | |
Add LibHTTPC_free
Diffstat (limited to 'include/libhttpc.h')
| -rw-r--r-- | include/libhttpc.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/libhttpc.h b/include/libhttpc.h index 87f6e6c..6160d21 100644 --- a/include/libhttpc.h +++ b/include/libhttpc.h @@ -16,6 +16,11 @@ typedef void *LibHTTPC_Malloc(size_t); * @see libhttpc_realloc */ typedef void *LibHTTPC_Realloc(void *, size_t); +/** + * Just typedef to make libhttpc_free definition more readable + * @see libhttpc_realloc + */ +typedef void LibHTTPC_Free(void *); /** * Enum that contains all headers that are supported by the HTTP/1.1 @@ -192,13 +197,17 @@ extern LibHTTPC_Malloc *LibHTTPC_malloc; * Realloc used by the library */ extern LibHTTPC_Realloc *LibHTTPC_realloc; +/** + * Free used by the library + */ +extern LibHTTPC_Free *LibHTTPC_free; /** * Setup LibHTTPC_malloc and LibHTTPC_realloc * @param malloc Malloc implementation * @param realloc Realloc implementation */ -void LibHTTPC(LibHTTPC_Malloc *malloc, LibHTTPC_Realloc *realloc); +void LibHTTPC(LibHTTPC_Malloc *malloc, LibHTTPC_Realloc *realloc, LibHTTPC_Free *free); /** * Parse header name |