This commit is contained in:
Christian Grothoff
2019-07-22 12:37:45 +02:00
parent 3d1b941137
commit 9c7dc624ac
3 changed files with 8 additions and 15 deletions
+1 -1
View File
@@ -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
+6 -13
View File
@@ -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
@@ -2910,15 +2912,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.
*
+1 -1
View File
@@ -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;