mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 06:48:17 +00:00
rstream: Expose rstream_read_ptr and _available.
Needed for accessing this information without direct access to the rstream_buffer.
This commit is contained in:

committed by
Thiago de Arruda

parent
4df884a611
commit
50f1c5db25
@@ -190,6 +190,18 @@ RStream * rstream_new(rstream_cb cb, RBuffer *buffer, void *data)
|
||||
return rv;
|
||||
}
|
||||
|
||||
/// Returns the read pointer used by the rstream.
|
||||
char *rstream_read_ptr(RStream *rstream)
|
||||
{
|
||||
return rbuffer_read_ptr(rstream->buffer);
|
||||
}
|
||||
|
||||
/// Returns the number of bytes before the rstream is full.
|
||||
size_t rstream_available(RStream *rstream)
|
||||
{
|
||||
return rbuffer_available(rstream->buffer);
|
||||
}
|
||||
|
||||
/// Frees all memory allocated for a RStream instance
|
||||
///
|
||||
/// @param rstream The `RStream` instance
|
||||
|
Reference in New Issue
Block a user