From 786472f41bc2a7db3bd271fccaaff57fc74b6989 Mon Sep 17 00:00:00 2001 From: Nakidai Date: Sun, 24 Nov 2024 19:48:43 +0300 Subject: Add LibHTTPC_free --- include/libhttpc.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include') 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 -- cgit 1.4.1