commit 6b6a0fa7ec9029c28791bf29c284ee7fba666a7a
parent d5d9357fbbe6b697a01c76d009cbefb2b9a72c32
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date: Mon, 20 Jul 2026 18:29:04 +0200
MHD_response_from_buffer_XX(): clarified public doxy
Diffstat:
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/include/microhttpd2.h b/src/include/microhttpd2.h
@@ -6461,6 +6461,8 @@ MHD_FN_PAR_IN_SIZE_ (3, 2);
* @param sc status code to use for the response
* @param len number of bytes in @a buf
* @param buf buffer with response payload
+ * @return new response object on success,
+ * NULL on failure (i.e. invalid arguments, out of memory)
*/
#define MHD_response_from_buffer_static(sc, len, buf) \
MHD_response_from_buffer (sc, len, buf, NULL, NULL)
@@ -6472,6 +6474,8 @@ MHD_FN_PAR_IN_SIZE_ (3, 2);
* The response object can be extended with header information and then be used
* any number of times.
* @param sc status code to use for the response
+ * @return new response object on success,
+ * NULL on failure (i.e. invalid arguments, out of memory)
*/
#define MHD_response_from_empty(sc) \
MHD_response_from_buffer_static (sc, 0, "")
@@ -6486,8 +6490,8 @@ MHD_FN_PAR_IN_SIZE_ (3, 2);
* @param buffer the @a size bytes containing the response's data portion,
* an internal copy will be made, there is no need to
* keep this data after return from this function
- * @return NULL on error (i.e. invalid arguments, out of memory)
- * FIXME: Call free callback on error?
+ * @return new response object on success,
+ * NULL on failure (i.e. invalid arguments, out of memory)
* @ingroup response
*/
MHD_EXTERN_ struct MHD_Response *
diff --git a/src/include/microhttpd2_main.h.in b/src/include/microhttpd2_main.h.in
@@ -1544,6 +1544,8 @@ MHD_FN_PAR_IN_SIZE_ (3, 2);
* @param sc status code to use for the response
* @param len number of bytes in @a buf
* @param buf buffer with response payload
+ * @return new response object on success,
+ * NULL on failure (i.e. invalid arguments, out of memory)
*/
#define MHD_response_from_buffer_static(sc, len, buf) \
MHD_response_from_buffer (sc, len, buf, NULL, NULL)
@@ -1555,6 +1557,8 @@ MHD_FN_PAR_IN_SIZE_ (3, 2);
* The response object can be extended with header information and then be used
* any number of times.
* @param sc status code to use for the response
+ * @return new response object on success,
+ * NULL on failure (i.e. invalid arguments, out of memory)
*/
#define MHD_response_from_empty(sc) \
MHD_response_from_buffer_static (sc, 0, "")
@@ -1569,8 +1573,8 @@ MHD_FN_PAR_IN_SIZE_ (3, 2);
* @param buffer the @a size bytes containing the response's data portion,
* an internal copy will be made, there is no need to
* keep this data after return from this function
- * @return NULL on error (i.e. invalid arguments, out of memory)
- * FIXME: Call free callback on error?
+ * @return new response object on success,
+ * NULL on failure (i.e. invalid arguments, out of memory)
* @ingroup response
*/
MHD_EXTERN_ struct MHD_Response *