libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 9c7dc624ac5b251101e5f5b351ec660f67b312af
parent 3d1b941137f9d8379e6e67d5abd57be5ae6ebe1a
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 22 Jul 2019 12:37:45 +0200

unify

Diffstat:
Mdoc/libmicrohttpd.texi | 2+-
Msrc/include/microhttpd.h | 19++++++-------------
Msrc/microhttpd/response.c | 2+-
3 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/doc/libmicrohttpd.texi b/doc/libmicrohttpd.texi @@ -1226,7 +1226,7 @@ Use a custom function for freeing the memory passed when using @code{MHD_RESPMEM_MUST_FREE}. This replaces the use of libc's @code{free()} function to release the memory with an implementation provided by the application. The next argument must be of type -@code{MHD_FreeFunction}. +@code{MHD_ContentReaderFreeCallback}. @end table @end deftp diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h @@ -2256,10 +2256,12 @@ typedef ssize_t /** - * This method is called by libmicrohttpd if we - * are done with a content reader. It should - * be used to free resources associated with the - * content reader. + * This method is called by libmicrohttpd if we are done with a content + * reader. It should be used to free resources associated with the content + * reader. + * + * It is also used as a va_arg in #MHD_set_response_options() in combination + * with #MHD_RO_FREE_FUNCTION. * * @param cls closure * @ingroup response @@ -2911,15 +2913,6 @@ enum MHD_ResponseOptions /** - * This typedef is defined to be able to pass a function pointer - * as a va_arg in #MHD_set_response_options() in combination - * with #MHD_RO_FREE_FUNCTION. - */ -typedef void -(*MHD_FreeFunction)(void *); - - -/** * Set special flags and options for a response. * * @param response the response to modify diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c @@ -426,7 +426,7 @@ MHD_set_response_options (struct MHD_Response *response, { case MHD_RO_FREE_FUNCTION: va_start (ap, flags); - if (NULL != (response->crfc = va_arg (ap, MHD_free_ptr))) { + if (NULL != (response->crfc = va_arg (ap, MHD_ContentReaderFreeCallback))) { ret = MHD_YES; } else { ret = MHD_NO;