Add 'FUNC_ATTR_NONNULL_RET' to nonnull alloc funcs (#14559)

This commit is contained in:
Jan Edmund Lazo
2021-05-15 20:36:13 -04:00
committed by GitHub
parent d67dcaba02
commit 6ab83f3572
5 changed files with 10 additions and 5 deletions

View File

@@ -2098,7 +2098,7 @@ void tv_dict_set_keys_readonly(dict_T *const dict)
///
/// @return [allocated] pointer to the created list.
list_T *tv_list_alloc_ret(typval_T *const ret_tv, const ptrdiff_t len)
FUNC_ATTR_NONNULL_ALL
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_NONNULL_RET
{
list_T *const l = tv_list_alloc(len);
tv_list_set_ret(ret_tv, l);
@@ -2107,6 +2107,7 @@ list_T *tv_list_alloc_ret(typval_T *const ret_tv, const ptrdiff_t len)
}
dict_T *tv_dict_alloc_lock(VarLockStatus lock)
FUNC_ATTR_NONNULL_RET
{
dict_T *const d = tv_dict_alloc();
d->dv_lock = lock;