aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-07-22 12:37:45 +0200
committerChristian Grothoff <christian@grothoff.org>2019-07-22 12:37:45 +0200
commit9c7dc624ac5b251101e5f5b351ec660f67b312af (patch)
treef6c9ac770c735fbb65236260bf004b9f8d5760cc
parent3d1b941137f9d8379e6e67d5abd57be5ae6ebe1a (diff)
downloadlibmicrohttpd-9c7dc624ac5b251101e5f5b351ec660f67b312af.tar.gz
libmicrohttpd-9c7dc624ac5b251101e5f5b351ec660f67b312af.zip
unify
-rw-r--r--doc/libmicrohttpd.texi2
-rw-r--r--src/include/microhttpd.h19
-rw-r--r--src/microhttpd/response.c2
3 files changed, 8 insertions, 15 deletions
diff --git a/doc/libmicrohttpd.texi b/doc/libmicrohttpd.texi
index aa3f0242..242e338b 100644
--- a/doc/libmicrohttpd.texi
+++ b/doc/libmicrohttpd.texi
@@ -1226,7 +1226,7 @@ Use a custom function for freeing the memory passed when using
1226@code{MHD_RESPMEM_MUST_FREE}. This replaces the use of libc's 1226@code{MHD_RESPMEM_MUST_FREE}. This replaces the use of libc's
1227@code{free()} function to release the memory with an implementation 1227@code{free()} function to release the memory with an implementation
1228provided by the application. The next argument must be of type 1228provided by the application. The next argument must be of type
1229@code{MHD_FreeFunction}. 1229@code{MHD_ContentReaderFreeCallback}.
1230@end table 1230@end table
1231@end deftp 1231@end deftp
1232 1232
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 34f82154..93382152 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -2256,10 +2256,12 @@ typedef ssize_t
2256 2256
2257 2257
2258/** 2258/**
2259 * This method is called by libmicrohttpd if we 2259 * This method is called by libmicrohttpd if we are done with a content
2260 * are done with a content reader. It should 2260 * reader. It should be used to free resources associated with the content
2261 * be used to free resources associated with the 2261 * reader.
2262 * content reader. 2262 *
2263 * It is also used as a va_arg in #MHD_set_response_options() in combination
2264 * with #MHD_RO_FREE_FUNCTION.
2263 * 2265 *
2264 * @param cls closure 2266 * @param cls closure
2265 * @ingroup response 2267 * @ingroup response
@@ -2911,15 +2913,6 @@ enum MHD_ResponseOptions
2911 2913
2912 2914
2913/** 2915/**
2914 * This typedef is defined to be able to pass a function pointer
2915 * as a va_arg in #MHD_set_response_options() in combination
2916 * with #MHD_RO_FREE_FUNCTION.
2917 */
2918typedef void
2919(*MHD_FreeFunction)(void *);
2920
2921
2922/**
2923 * Set special flags and options for a response. 2916 * Set special flags and options for a response.
2924 * 2917 *
2925 * @param response the response to modify 2918 * @param response the response to modify
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index 21be419b..e9d5a4bf 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -426,7 +426,7 @@ MHD_set_response_options (struct MHD_Response *response,
426 { 426 {
427 case MHD_RO_FREE_FUNCTION: 427 case MHD_RO_FREE_FUNCTION:
428 va_start (ap, flags); 428 va_start (ap, flags);
429 if (NULL != (response->crfc = va_arg (ap, MHD_free_ptr))) { 429 if (NULL != (response->crfc = va_arg (ap, MHD_ContentReaderFreeCallback))) {
430 ret = MHD_YES; 430 ret = MHD_YES;
431 } else { 431 } else {
432 ret = MHD_NO; 432 ret = MHD_NO;