mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
build/MSVC: fix "C4003: not enough actual parameters for macro"
For the case of TV_DICTITEM_STRUCT, we can't just pass `1` because: https://github.com/neovim/neovim/pull/8142#discussion_r175262436 > this variant will trigger array overrun warnings from various static analyzers.
This commit is contained in:
parent
960f093625
commit
26b84a8b3e
@ -567,7 +567,7 @@ static inline void typval_encode_dict_end(EncodedData *const edata)
|
||||
typval_encode_dict_end(edata)
|
||||
|
||||
#define TYPVAL_ENCODE_CONV_RECURSE(val, conv_type) \
|
||||
TYPVAL_ENCODE_CONV_NIL()
|
||||
TYPVAL_ENCODE_CONV_NIL(val)
|
||||
|
||||
#define TYPVAL_ENCODE_SCOPE static
|
||||
#define TYPVAL_ENCODE_NAME object
|
||||
|
@ -206,11 +206,11 @@ struct dictitem_S {
|
||||
char_u di_key[1]; ///< key (actually longer!)
|
||||
};
|
||||
|
||||
#define TV_DICTITEM_STRUCT(KEY_LEN) \
|
||||
#define TV_DICTITEM_STRUCT(...) \
|
||||
struct { \
|
||||
typval_T di_tv; /* Structure that holds scope dictionary itself. */ \
|
||||
uint8_t di_flags; /* Flags. */ \
|
||||
char_u di_key[KEY_LEN]; /* Key value. */ \
|
||||
char_u di_key[__VA_ARGS__]; /* Key value. */ \
|
||||
}
|
||||
|
||||
/// Structure to hold a scope dictionary
|
||||
|
@ -423,7 +423,7 @@ nlua_pop_typval_table_processing_end:
|
||||
#define TYPVAL_ENCODE_CONV_STR_STRING TYPVAL_ENCODE_CONV_STRING
|
||||
|
||||
#define TYPVAL_ENCODE_CONV_EXT_STRING(tv, str, len, type) \
|
||||
TYPVAL_ENCODE_CONV_NIL()
|
||||
TYPVAL_ENCODE_CONV_NIL(tv)
|
||||
|
||||
#define TYPVAL_ENCODE_CONV_FUNC_START(tv, fun) \
|
||||
do { \
|
||||
|
Loading…
Reference in New Issue
Block a user