Make parameters const pointer
This commit is contained in:
parent
f50596e355
commit
c4d36aeff7
|
@ -4628,8 +4628,8 @@ nghttp2_hd_deflate_hd(nghttp2_hd_deflater *deflater, uint8_t *buf,
|
||||||
* The provided |buflen| size is too small to hold the output.
|
* The provided |buflen| size is too small to hold the output.
|
||||||
*/
|
*/
|
||||||
NGHTTP2_EXTERN ssize_t
|
NGHTTP2_EXTERN ssize_t
|
||||||
nghttp2_hd_deflate_hd_vec(nghttp2_hd_deflater *deflater, uint8_t **bufsin,
|
nghttp2_hd_deflate_hd_vec(nghttp2_hd_deflater *deflater, uint8_t *const *bufsin,
|
||||||
size_t inlen, size_t buflen, size_t *buflens,
|
size_t inlen, size_t buflen, size_t *const buflens,
|
||||||
const nghttp2_nv *nva, size_t nvlen);
|
const nghttp2_nv *nva, size_t nvlen);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -223,8 +223,8 @@ int nghttp2_bufs_wrap_init(nghttp2_bufs *bufs, uint8_t *begin, size_t len,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int nghttp2_bufs_wrap_init2(nghttp2_bufs *bufs, uint8_t **bufs_in, size_t in_len,
|
int nghttp2_bufs_wrap_init2(nghttp2_bufs *bufs, uint8_t *const *bufs_in,
|
||||||
size_t buf_len, nghttp2_mem *mem) {
|
size_t in_len, size_t buf_len, nghttp2_mem *mem) {
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
nghttp2_buf_chain *cur_chain;
|
nghttp2_buf_chain *cur_chain;
|
||||||
nghttp2_buf_chain *pre_chain = NULL;
|
nghttp2_buf_chain *pre_chain = NULL;
|
||||||
|
@ -305,7 +305,7 @@ size_t nghttp2_bufs_len(nghttp2_bufs *bufs) {
|
||||||
return len;
|
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;
|
nghttp2_buf_chain *ci;
|
||||||
size_t len, total_len = 0;
|
size_t len, total_len = 0;
|
||||||
int i = 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
|
* NGHTTP2_ERR_NOMEM
|
||||||
* Out of memory.
|
* Out of memory.
|
||||||
*/
|
*/
|
||||||
int nghttp2_bufs_wrap_init2(nghttp2_bufs *bufs, uint8_t **bufs_in, size_t in_len,
|
int nghttp2_bufs_wrap_init2(nghttp2_bufs *bufs, uint8_t *const *bufs_in,
|
||||||
size_t buf_len, nghttp2_mem *mem);
|
size_t in_len, size_t buf_len, nghttp2_mem *mem);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Frees any related resource to the |bufs|. This function does not
|
* 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|.
|
* 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 */
|
#endif /* NGHTTP2_BUF_H */
|
||||||
|
|
|
@ -1503,8 +1503,9 @@ ssize_t nghttp2_hd_deflate_hd(nghttp2_hd_deflater *deflater, uint8_t *buf,
|
||||||
return (ssize_t)buflen;
|
return (ssize_t)buflen;
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize_t nghttp2_hd_deflate_hd_vec(nghttp2_hd_deflater *deflater, uint8_t **bufsin,
|
ssize_t nghttp2_hd_deflate_hd_vec(nghttp2_hd_deflater *deflater,
|
||||||
size_t inlen, size_t buflen, size_t *buflens,
|
uint8_t *const *bufsin, size_t inlen,
|
||||||
|
size_t buflen, size_t *const buflens,
|
||||||
const nghttp2_nv *nv, size_t nvlen) {
|
const nghttp2_nv *nv, size_t nvlen) {
|
||||||
nghttp2_bufs bufs;
|
nghttp2_bufs bufs;
|
||||||
int rv;
|
int rv;
|
||||||
|
|
Loading…
Reference in New Issue