mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 00:18:33 +00:00
refactor(IWYU): create {ex_getln,rbuffer,os/fileio}_defs.h (#26338)
This commit is contained in:
@@ -29,27 +29,12 @@ RBuffer *rbuffer_new(size_t capacity)
|
||||
return rv;
|
||||
}
|
||||
|
||||
void rbuffer_free(RBuffer *buf)
|
||||
void rbuffer_free(RBuffer *buf) FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
xfree(buf->temp);
|
||||
xfree(buf);
|
||||
}
|
||||
|
||||
size_t rbuffer_size(RBuffer *buf) FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
return buf->size;
|
||||
}
|
||||
|
||||
size_t rbuffer_capacity(RBuffer *buf) FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
return (size_t)(buf->end_ptr - buf->start_ptr);
|
||||
}
|
||||
|
||||
size_t rbuffer_space(RBuffer *buf) FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
return rbuffer_capacity(buf) - buf->size;
|
||||
}
|
||||
|
||||
/// Return a pointer to a raw buffer containing the first empty slot available
|
||||
/// for writing. The second argument is a pointer to the maximum number of
|
||||
/// bytes that could be written.
|
||||
|
Reference in New Issue
Block a user