aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/typval.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/eval/typval.h')
-rw-r--r--src/nvim/eval/typval.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/nvim/eval/typval.h b/src/nvim/eval/typval.h
index 58f74a9796..f9ebd2f778 100644
--- a/src/nvim/eval/typval.h
+++ b/src/nvim/eval/typval.h
@@ -6,14 +6,13 @@
#include <stdint.h>
#include <string.h>
-#include "nvim/eval/typval_defs.h" // IWYU pragma: export
+#include "nvim/eval/typval_defs.h" // IWYU pragma: keep
#include "nvim/func_attr.h"
-#include "nvim/garray_defs.h"
-#include "nvim/gettext.h"
+#include "nvim/gettext_defs.h"
#include "nvim/hashtab.h"
-#include "nvim/lib/queue.h"
+#include "nvim/lib/queue_defs.h"
#include "nvim/macros_defs.h"
-#include "nvim/mbyte_defs.h"
+#include "nvim/mbyte_defs.h" // IWYU pragma: keep
#include "nvim/message.h"
#include "nvim/types_defs.h"
@@ -85,6 +84,9 @@ static inline void tv_list_set_lock(list_T *const l, const VarLockStatus lock)
l->lv_lock = lock;
}
+static inline void tv_list_set_copyid(list_T *l, int copyid)
+ REAL_FATTR_NONNULL_ALL;
+
/// Set list copyID
///
/// Does not expect NULL list, be careful.
@@ -92,7 +94,6 @@ static inline void tv_list_set_lock(list_T *const l, const VarLockStatus lock)
/// @param[out] l List to modify.
/// @param[in] copyid New copyID.
static inline void tv_list_set_copyid(list_T *const l, const int copyid)
- FUNC_ATTR_NONNULL_ALL
{
l->lv_copyID = copyid;
}
@@ -359,7 +360,7 @@ extern bool tv_in_free_unref_items;
/// @param li Name of the variable with current listitem_T entry.
/// @param code Cycle body.
#define TV_LIST_ITER(l, li, code) \
- TV_LIST_ITER_MOD( , l, li, code) // NOLINT(whitespace/parens)
+ TV_LIST_ITER_MOD( , l, li, code)
/// Iterate over a list
///
@@ -442,22 +443,20 @@ static inline bool tv_get_float_chk(const typval_T *const tv, float_T *const ret
}
static inline DictWatcher *tv_dict_watcher_node_data(QUEUE *q)
- REAL_FATTR_NONNULL_ALL REAL_FATTR_NONNULL_RET REAL_FATTR_PURE
- REAL_FATTR_WARN_UNUSED_RESULT REAL_FATTR_ALWAYS_INLINE
- FUNC_ATTR_NO_SANITIZE_ADDRESS;
+ REAL_FATTR_ALWAYS_INLINE REAL_FATTR_NONNULL_ALL REAL_FATTR_NONNULL_RET
+ REAL_FATTR_NO_SANITIZE_ADDRESS REAL_FATTR_PURE REAL_FATTR_WARN_UNUSED_RESULT;
/// Compute the `DictWatcher` address from a QUEUE node.
///
/// This only exists for .asan-blacklist (ASAN doesn't handle QUEUE_DATA pointer
/// arithmetic).
static inline DictWatcher *tv_dict_watcher_node_data(QUEUE *q)
- FUNC_ATTR_NO_SANITIZE_ADDRESS
{
return QUEUE_DATA(q, DictWatcher, node);
}
static inline bool tv_is_func(typval_T tv)
- FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_ALWAYS_INLINE FUNC_ATTR_CONST;
+ REAL_FATTR_WARN_UNUSED_RESULT REAL_FATTR_ALWAYS_INLINE REAL_FATTR_CONST;
/// Check whether given typval_T contains a function
///