aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/private/helpers.h
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-09-20 07:34:50 +0200
committerJustin M. Keyes <justinkz@gmail.com>2024-09-23 14:42:57 +0200
commit737f58e23230ea14f1648ac1fc7f442ea0f8563c (patch)
treed16bee4c0ad2bb5ff2ec058cd09133a285674fef /src/nvim/api/private/helpers.h
parent5acdc4499e2036c90172b2b085f207ee4d5cfee4 (diff)
downloadrneovim-737f58e23230ea14f1648ac1fc7f442ea0f8563c.tar.gz
rneovim-737f58e23230ea14f1648ac1fc7f442ea0f8563c.tar.bz2
rneovim-737f58e23230ea14f1648ac1fc7f442ea0f8563c.zip
refactor(api)!: rename Dictionary => Dict
In the api_info() output: :new|put =map(filter(api_info().functions, '!has_key(v:val,''deprecated_since'')'), 'v:val') ... {'return_type': 'ArrayOf(Integer, 2)', 'name': 'nvim_win_get_position', 'method': v:true, 'parameters': [['Window', 'window']], 'since': 1} The `ArrayOf(Integer, 2)` return type didn't break clients when we added it, which is evidence that clients don't use the `return_type` field, thus renaming Dictionary => Dict in api_info() is not (in practice) a breaking change.
Diffstat (limited to 'src/nvim/api/private/helpers.h')
-rw-r--r--src/nvim/api/private/helpers.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/api/private/helpers.h b/src/nvim/api/private/helpers.h
index 7eda8ffaf6..57932e067e 100644
--- a/src/nvim/api/private/helpers.h
+++ b/src/nvim/api/private/helpers.h
@@ -53,9 +53,9 @@
.type = kObjectTypeArray, \
.data.array = a })
-#define DICTIONARY_OBJ(d) ((Object) { \
- .type = kObjectTypeDictionary, \
- .data.dictionary = d })
+#define DICT_OBJ(d) ((Object) { \
+ .type = kObjectTypeDict, \
+ .data.dict = d })
#define LUAREF_OBJ(r) ((Object) { \
.type = kObjectTypeLuaRef, \
@@ -90,7 +90,7 @@
name.items = name##__items; \
#define MAXSIZE_TEMP_DICT(name, maxsize) \
- Dictionary name = ARRAY_DICT_INIT; \
+ Dict name = ARRAY_DICT_INIT; \
KeyValuePair name##__items[maxsize]; \
name.capacity = maxsize; \
name.items = name##__items; \
@@ -121,7 +121,7 @@ typedef kvec_withinit_t(Object, 16) ArrayBuilder;
#define api_init_tabpage
#define api_init_object = NIL
#define api_init_array = ARRAY_DICT_INIT
-#define api_init_dictionary = ARRAY_DICT_INIT
+#define api_init_dict = ARRAY_DICT_INIT
#define KEYDICT_INIT { 0 }