aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/private/validate.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/api/private/validate.h')
-rw-r--r--src/nvim/api/private/validate.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/api/private/validate.h b/src/nvim/api/private/validate.h
index 2c1d1a241d..67af8adea8 100644
--- a/src/nvim/api/private/validate.h
+++ b/src/nvim/api/private/validate.h
@@ -42,7 +42,7 @@
#define VALIDATE_T(name, expected_t, actual_t, code) \
do { \
- STATIC_ASSERT(expected_t != kObjectTypeDictionary, "use VALIDATE_T_DICT"); \
+ STATIC_ASSERT(expected_t != kObjectTypeDict, "use VALIDATE_T_DICT"); \
if (expected_t != actual_t) { \
api_err_exp(err, name, api_typename(expected_t), api_typename(actual_t)); \
code; \
@@ -52,7 +52,7 @@
/// Checks that `obj_` has type `expected_t`.
#define VALIDATE_T2(obj_, expected_t, code) \
do { \
- STATIC_ASSERT(expected_t != kObjectTypeDictionary, "use VALIDATE_T_DICT"); \
+ STATIC_ASSERT(expected_t != kObjectTypeDict, "use VALIDATE_T_DICT"); \
if ((obj_).type != expected_t) { \
api_err_exp(err, STR(obj_), api_typename(expected_t), api_typename((obj_).type)); \
code; \
@@ -62,11 +62,11 @@
/// Checks that `obj_` has Dict type. Also allows empty Array in a Lua context.
#define VALIDATE_T_DICT(name, obj_, code) \
do { \
- if ((obj_).type != kObjectTypeDictionary \
+ if ((obj_).type != kObjectTypeDict \
&& !(channel_id == LUA_INTERNAL_CALL \
&& (obj_).type == kObjectTypeArray \
&& (obj_).data.array.size == 0)) { \
- api_err_exp(err, name, api_typename(kObjectTypeDictionary), api_typename((obj_).type)); \
+ api_err_exp(err, name, api_typename(kObjectTypeDict), api_typename((obj_).type)); \
code; \
} \
} while (0)