0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.0073: initializing globals with COMMA is clumsy

Problem:    Initializing globals with COMMA is clumsy.
Solution:   Use INIT2(), INIT3(), etc.
This commit is contained in:
Bram Moolenaar
2020-01-01 15:46:47 +01:00
parent bb062c1588
commit ea8b7aecab
3 changed files with 15 additions and 6 deletions

View File

@@ -1775,11 +1775,18 @@ void *vim_memset(void *, int, size_t);
#ifndef EXTERN
# define EXTERN extern
# define INIT(x)
# define INIT2(a, b)
# define INIT3(a, b, c)
# define INIT4(a, b, c, d)
# define INIT5(a, b, c, d, e)
#else
# ifndef INIT
# define INIT(x) x
# define INIT2(a, b) = {a, b}
# define INIT3(a, b, c) = {a, b, c}
# define INIT4(a, b, c, d) = {a, b, c, d}
# define INIT5(a, b, c, d, e) = {a, b, c, d, e}
# define DO_INIT
# define COMMA ,
# endif
#endif