mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
refactor(stream.c): unused params in stream_close #30356
This commit is contained in:
parent
ae917dbd06
commit
deac7df80a
@ -94,14 +94,17 @@ void stream_init(Loop *loop, Stream *stream, int fd, uv_stream_t *uvstream)
|
|||||||
stream->events = NULL;
|
stream->events = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void stream_close(Stream *stream, stream_close_cb on_stream_close, void *data, bool rstream)
|
void stream_may_close(Stream *stream, bool rstream)
|
||||||
FUNC_ATTR_NONNULL_ARG(1)
|
FUNC_ATTR_NONNULL_ARG(1)
|
||||||
{
|
{
|
||||||
|
if (stream->closed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
assert(!stream->closed);
|
assert(!stream->closed);
|
||||||
DLOG("closing Stream: %p", (void *)stream);
|
DLOG("closing Stream: %p", (void *)stream);
|
||||||
stream->closed = true;
|
stream->closed = true;
|
||||||
stream->close_cb = on_stream_close;
|
stream->close_cb = NULL;
|
||||||
stream->close_cb_data = data;
|
stream->close_cb_data = NULL;
|
||||||
|
|
||||||
#ifdef MSWIN
|
#ifdef MSWIN
|
||||||
if (UV_TTY == uv_guess_handle(stream->fd)) {
|
if (UV_TTY == uv_guess_handle(stream->fd)) {
|
||||||
@ -115,13 +118,6 @@ void stream_close(Stream *stream, stream_close_cb on_stream_close, void *data, b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void stream_may_close(Stream *stream, bool rstream)
|
|
||||||
{
|
|
||||||
if (!stream->closed) {
|
|
||||||
stream_close(stream, NULL, NULL, rstream);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void stream_close_handle(Stream *stream, bool rstream)
|
void stream_close_handle(Stream *stream, bool rstream)
|
||||||
FUNC_ATTR_NONNULL_ALL
|
FUNC_ATTR_NONNULL_ALL
|
||||||
{
|
{
|
||||||
|
@ -1292,7 +1292,7 @@ static void shell_write_cb(Stream *stream, void *data, int status)
|
|||||||
msg_schedule_semsg(_("E5677: Error writing input to shell-command: %s"),
|
msg_schedule_semsg(_("E5677: Error writing input to shell-command: %s"),
|
||||||
uv_err_name(status));
|
uv_err_name(status));
|
||||||
}
|
}
|
||||||
stream_close(stream, NULL, NULL, false);
|
stream_may_close(stream, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Applies 'shellxescape' (p_sxe) and 'shellxquote' (p_sxq) to a command.
|
/// Applies 'shellxescape' (p_sxe) and 'shellxquote' (p_sxq) to a command.
|
||||||
|
Loading…
Reference in New Issue
Block a user