mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 20:18:32 +00:00
feat(f_msgpackdump): support dumping to Blob
This commit is contained in:
@@ -47,6 +47,14 @@ const char *const encode_special_var_names[] = {
|
||||
# include "eval/encode.c.generated.h"
|
||||
#endif
|
||||
|
||||
/// Msgpack callback for writing to a Blob
|
||||
int encode_blob_write(void *const data, const char *const buf, const size_t len)
|
||||
FUNC_ATTR_NONNULL_ARG(1)
|
||||
{
|
||||
ga_concat_len(&((blob_T *)data)->bv_ga, buf, len);
|
||||
return (int)len;
|
||||
}
|
||||
|
||||
/// Msgpack callback for writing to readfile()-style list
|
||||
int encode_list_write(void *const data, const char *const buf, const size_t len)
|
||||
FUNC_ATTR_NONNULL_ARG(1)
|
||||
|
Reference in New Issue
Block a user