mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-15 07:15:03 -04:00
Make some evbuffer functions const
svn:r1010
This commit is contained in:
parent
89fe316779
commit
840318196b
4
buffer.c
4
buffer.c
@ -118,13 +118,13 @@ evbuffer_free(struct evbuffer *buffer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
evbuffer_get_length(struct evbuffer *buffer)
|
evbuffer_get_length(const struct evbuffer *buffer)
|
||||||
{
|
{
|
||||||
return (buffer->total_len);
|
return (buffer->total_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
evbuffer_get_contiguous_space(struct evbuffer *buf)
|
evbuffer_get_contiguous_space(const struct evbuffer *buf)
|
||||||
{
|
{
|
||||||
struct evbuffer_chain *chain = buf->first;
|
struct evbuffer_chain *chain = buf->first;
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ void evbuffer_free(struct evbuffer *buf);
|
|||||||
@param buf pointer to the evbuffer
|
@param buf pointer to the evbuffer
|
||||||
@return the number of bytes stored in the event buffer
|
@return the number of bytes stored in the event buffer
|
||||||
*/
|
*/
|
||||||
size_t evbuffer_get_length(struct evbuffer *buf);
|
size_t evbuffer_get_length(const struct evbuffer *buf);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the number of contiguous available bytes in the first buffer chain.
|
Returns the number of contiguous available bytes in the first buffer chain.
|
||||||
@ -107,7 +107,7 @@ size_t evbuffer_get_length(struct evbuffer *buf);
|
|||||||
@return 0 if no data is available, otherwise the number of available bytes
|
@return 0 if no data is available, otherwise the number of available bytes
|
||||||
in the first buffer chain.
|
in the first buffer chain.
|
||||||
*/
|
*/
|
||||||
size_t evbuffer_get_contiguous_space(struct evbuffer *buf);
|
size_t evbuffer_get_contiguous_space(const struct evbuffer *buf);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Expands the available space in an event buffer.
|
Expands the available space in an event buffer.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user