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.
This commit is contained in:
Justin M. Keyes
2024-09-20 07:34:50 +02:00
parent 5acdc4499e
commit 737f58e232
77 changed files with 606 additions and 622 deletions

View File

@@ -231,7 +231,7 @@ typedef struct {
ShadaEntryType type;
Timestamp timestamp;
union {
Dictionary header;
Dict header;
struct shada_filemark {
char name;
pos_T mark;
@@ -812,7 +812,7 @@ static inline void hms_dealloc(HistoryMergerState *const hms_p)
/// Iterate over global variables
///
/// @warning No modifications to global variable dictionary must be performed
/// @warning No modifications to global variable Dict must be performed
/// while iteration is in progress.
///
/// @param[in] iter Iterator. Pass NULL to start iteration.
@@ -2911,7 +2911,7 @@ static void shada_free_shada_entry(ShadaEntry *const entry)
xfree(entry->data.unknown_item.contents);
break;
case kSDItemHeader:
api_free_dictionary(entry->data.header);
api_free_dict(entry->data.header);
break;
case kSDItemChange:
case kSDItemJump:
@@ -3230,7 +3230,7 @@ shada_read_next_item_start:
case kSDItemHeader:
// TODO(bfredl): header is written to file and provides useful debugging
// info. It is never read by nvim (earlier we parsed it back to a
// Dictionary, but that value was never used)
// Dict, but that value was never used)
break;
case kSDItemSearchPattern: {
Dict(_shada_search_pat) *it = &entry->data.search_pattern;