refactor(api/nvim_cmd): use kvec_t for constructing cmdline string

Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
This commit is contained in:
Famiu Haque
2022-05-12 10:57:43 +02:00
parent 8fba428bc6
commit 566f8f80d6
5 changed files with 111 additions and 109 deletions

View File

@@ -7,6 +7,7 @@
#include "nvim/eval/typval.h"
#include "nvim/types.h"
#include "nvim/lib/kvec.h"
/// Append string to string and return pointer to the next byte
///
@@ -25,6 +26,8 @@ static inline char *strappend(char *const dst, const char *const src)
return (char *)memmove(dst, src, src_len) + src_len;
}
typedef kvec_t(char) StringBuilder;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "strings.h.generated.h"
#endif