const-ify stream argument to uv_is_readable() and uv_is_writable()
This commit is contained in:
parent
edb39b2499
commit
132fe600c7
@ -541,8 +541,8 @@ struct uv_write_s {
|
||||
/*
|
||||
* Used to determine whether a stream is readable or writable.
|
||||
*/
|
||||
UV_EXTERN int uv_is_readable(uv_stream_t* handle);
|
||||
UV_EXTERN int uv_is_writable(uv_stream_t* handle);
|
||||
UV_EXTERN int uv_is_readable(const uv_stream_t* handle);
|
||||
UV_EXTERN int uv_is_writable(const uv_stream_t* handle);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -1006,12 +1006,12 @@ int uv_read_stop(uv_stream_t* stream) {
|
||||
}
|
||||
|
||||
|
||||
int uv_is_readable(uv_stream_t* stream) {
|
||||
int uv_is_readable(const uv_stream_t* stream) {
|
||||
return stream->flags & UV_READABLE;
|
||||
}
|
||||
|
||||
|
||||
int uv_is_writable(uv_stream_t* stream) {
|
||||
int uv_is_writable(const uv_stream_t* stream) {
|
||||
return stream->flags & UV_WRITABLE;
|
||||
}
|
||||
|
||||
|
||||
@ -191,11 +191,11 @@ size_t uv_count_bufs(uv_buf_t bufs[], int count) {
|
||||
}
|
||||
|
||||
|
||||
int uv_is_readable(uv_stream_t* handle) {
|
||||
int uv_is_readable(const uv_stream_t* handle) {
|
||||
return !(handle->flags & UV_HANDLE_EOF);
|
||||
}
|
||||
|
||||
|
||||
int uv_is_writable(uv_stream_t* handle) {
|
||||
int uv_is_writable(const uv_stream_t* handle) {
|
||||
return !(handle->flags & UV_HANDLE_SHUTTING);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user