Merge pull request #23730 from famiu/refactor/api/helpers

refactor(api): new helper macros for cstrings as objects
This commit is contained in:
bfredl
2023-05-23 12:01:20 +02:00
committed by GitHub
32 changed files with 103 additions and 99 deletions

View File

@@ -1560,7 +1560,7 @@ static bool hlgroup2dict(Dictionary *hl, NS ns_id, int hl_id, Arena *arena)
PUT_C(*hl, "default", BOOLEAN_OBJ(true));
}
if (link > 0) {
PUT_C(*hl, "link", STRING_OBJ(cstr_as_string(hl_table[link - 1].sg_name)));
PUT_C(*hl, "link", CSTR_AS_OBJ(hl_table[link - 1].sg_name));
}
Dictionary hl_cterm = arena_dict(arena, HLATTRS_DICT_SIZE);
hlattrs2dict(hl, NULL, attr, true, true);