mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 13:58:18 +00:00
perf(api): allow to use an arena for return values
This commit is contained in:
@@ -1021,7 +1021,7 @@ void nvim_buf_del_var(Buffer buffer, String name, Error *err)
|
||||
/// @param buffer Buffer handle, or 0 for current buffer
|
||||
/// @param[out] err Error details, if any
|
||||
/// @return Buffer name
|
||||
String nvim_buf_get_name(Buffer buffer, Error *err)
|
||||
String nvim_buf_get_name(Buffer buffer, Arena *arena, Error *err)
|
||||
FUNC_API_SINCE(1)
|
||||
{
|
||||
String rv = STRING_INIT;
|
||||
@@ -1031,7 +1031,7 @@ String nvim_buf_get_name(Buffer buffer, Error *err)
|
||||
return rv;
|
||||
}
|
||||
|
||||
return cstr_to_string((char *)buf->b_ffname);
|
||||
return cstr_as_string((char *)buf->b_ffname);
|
||||
}
|
||||
|
||||
/// Sets the full file name for a buffer
|
||||
|
Reference in New Issue
Block a user