*: Hide list implementation in other files as well

This commit is contained in:
ZyX
2017-12-10 22:04:43 +03:00
parent 5c1ddb5078
commit ac4bbf55f6
17 changed files with 278 additions and 235 deletions

View File

@@ -383,6 +383,22 @@ static inline listitem_T *tv_list_first(const list_T *const l)
return l->lv_first;
}
static inline listitem_T *tv_list_last(const list_T *const l)
REAL_FATTR_PURE REAL_FATTR_WARN_UNUSED_RESULT;
/// Get last list item
///
/// @param[in] l List to get item from.
///
/// @return List item or NULL in case of an empty list.
static inline listitem_T *tv_list_last(const list_T *const l)
{
if (l == NULL) {
return NULL;
}
return l->lv_last;
}
static inline long tv_dict_len(const dict_T *const d)
REAL_FATTR_PURE REAL_FATTR_WARN_UNUSED_RESULT;