From 09c647fd1b07064d341cd923ab48278e35f1075b Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 18 Aug 2016 21:26:58 +0900 Subject: [PATCH] Update doc --- lib/nghttp2_buf.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/nghttp2_buf.h b/lib/nghttp2_buf.h index 22b7d072..06ab1e4c 100644 --- a/lib/nghttp2_buf.h +++ b/lib/nghttp2_buf.h @@ -138,7 +138,9 @@ typedef struct { nghttp2_buf_chain *cur; /* Memory allocator */ nghttp2_mem *mem; - /* The buffer capacity of each buf */ + /* The buffer capacity of each buf. This field may be 0 if + nghttp2_bufs is initialized by nghttp2_bufs_wrap_init* family + functions. */ size_t chunk_length; /* The maximum number of nghttp2_buf_chain */ size_t max_chunk; @@ -201,6 +203,9 @@ void nghttp2_bufs_free(nghttp2_bufs *bufs); * words, max_chunk = chunk_keep = 1. To free the resource allocated * for |bufs|, use nghttp2_bufs_wrap_free(). * + * Don't use the function which performs allocation, such as + * nghttp2_bufs_realloc(). + * * This function returns 0 if it succeeds, or one of the following * negative error codes: * @@ -217,6 +222,9 @@ int nghttp2_bufs_wrap_init(nghttp2_bufs *bufs, uint8_t *begin, size_t len, * free the resource allocated for |bufs|, use * nghttp2_bufs_wrap_free(). * + * Don't use the function which performs allocation, such as + * nghttp2_bufs_realloc(). + * * This function returns 0 if it succeeds, or one of the following * negative error codes: *