Commit c4d36aef authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Make parameters const pointer

parent f50596e3
......@@ -4628,9 +4628,9 @@ nghttp2_hd_deflate_hd(nghttp2_hd_deflater *deflater, uint8_t *buf,
* The provided |buflen| size is too small to hold the output.
*/
NGHTTP2_EXTERN ssize_t
nghttp2_hd_deflate_hd_vec(nghttp2_hd_deflater *deflater, uint8_t **bufsin,
size_t inlen, size_t buflen, size_t *buflens,
const nghttp2_nv *nva, size_t nvlen);
nghttp2_hd_deflate_hd_vec(nghttp2_hd_deflater *deflater, uint8_t *const *bufsin,
size_t inlen, size_t buflen, size_t *const buflens,
const nghttp2_nv *nva, size_t nvlen);
/**
* @function
......
......@@ -223,8 +223,8 @@ int nghttp2_bufs_wrap_init(nghttp2_bufs *bufs, uint8_t *begin, size_t len,
return 0;
}
int nghttp2_bufs_wrap_init2(nghttp2_bufs *bufs, uint8_t **bufs_in, size_t in_len,
size_t buf_len, nghttp2_mem *mem) {
int nghttp2_bufs_wrap_init2(nghttp2_bufs *bufs, uint8_t *const *bufs_in,
size_t in_len, size_t buf_len, nghttp2_mem *mem) {
size_t i = 0;
nghttp2_buf_chain *cur_chain;
nghttp2_buf_chain *pre_chain = NULL;
......@@ -305,7 +305,7 @@ size_t nghttp2_bufs_len(nghttp2_bufs *bufs) {
return len;
}
size_t nghttp2_bufs_len_vec(nghttp2_bufs *bufs, size_t *buflens) {
size_t nghttp2_bufs_len_vec(nghttp2_bufs *bufs, size_t *const buflens) {
nghttp2_buf_chain *ci;
size_t len, total_len = 0;
int i = 0;
......
......@@ -223,8 +223,8 @@ int nghttp2_bufs_wrap_init(nghttp2_bufs *bufs, uint8_t *begin, size_t len,
* NGHTTP2_ERR_NOMEM
* Out of memory.
*/
int nghttp2_bufs_wrap_init2(nghttp2_bufs *bufs, uint8_t **bufs_in, size_t in_len,
size_t buf_len, nghttp2_mem *mem);
int nghttp2_bufs_wrap_init2(nghttp2_bufs *bufs, uint8_t *const *bufs_in,
size_t in_len, size_t buf_len, nghttp2_mem *mem);
/*
* Frees any related resource to the |bufs|. This function does not
......@@ -404,6 +404,6 @@ size_t nghttp2_bufs_len(nghttp2_bufs *bufs);
/*
* Returns the total buffer length of |bufs|, and each buffer length in |buflens|.
*/
size_t nghttp2_bufs_len_vec(nghttp2_bufs *bufs, size_t *buflens);
size_t nghttp2_bufs_len_vec(nghttp2_bufs *bufs, size_t *const buflens);
#endif /* NGHTTP2_BUF_H */
......@@ -1503,9 +1503,10 @@ ssize_t nghttp2_hd_deflate_hd(nghttp2_hd_deflater *deflater, uint8_t *buf,
return (ssize_t)buflen;
}
ssize_t nghttp2_hd_deflate_hd_vec(nghttp2_hd_deflater *deflater, uint8_t **bufsin,
size_t inlen, size_t buflen, size_t *buflens,
const nghttp2_nv *nv, size_t nvlen) {
ssize_t nghttp2_hd_deflate_hd_vec(nghttp2_hd_deflater *deflater,
uint8_t *const *bufsin, size_t inlen,
size_t buflen, size_t *const buflens,
const nghttp2_nv *nv, size_t nvlen) {
nghttp2_bufs bufs;
int rv;
nghttp2_mem *mem;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment