mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 02:16:31 +00:00
perf(ui): eliminate spurious memory allocations for hl_attr_define event
This commit is contained in:
@@ -86,6 +86,12 @@
|
||||
name.capacity = maxsize; \
|
||||
name.items = name##__items; \
|
||||
|
||||
#define MAXSIZE_TEMP_DICT(name, maxsize) \
|
||||
Dictionary name = ARRAY_DICT_INIT; \
|
||||
KeyValuePair name##__items[maxsize]; \
|
||||
name.capacity = maxsize; \
|
||||
name.items = name##__items; \
|
||||
|
||||
#define cbuf_as_string(d, s) ((String) { .data = d, .size = s })
|
||||
|
||||
#define STATIC_CSTR_AS_STRING(s) ((String) { .data = s, .size = sizeof(s) - 1 })
|
||||
|
Reference in New Issue
Block a user