diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-12 19:16:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-12 19:16:24 +0800 |
commit | f79773a3b4b3ce5a3b37652a72b12089880f32a4 (patch) | |
tree | f86eb1b3bf90d13844a7b2c43065e380ffd1bb13 /src/nvim/ex_eval.c | |
parent | 1cf3a4b4095913ff9a241c07294af74e573eed54 (diff) | |
download | rneovim-f79773a3b4b3ce5a3b37652a72b12089880f32a4.tar.gz rneovim-f79773a3b4b3ce5a3b37652a72b12089880f32a4.tar.bz2 rneovim-f79773a3b4b3ce5a3b37652a72b12089880f32a4.zip |
refactor: move non-symbols in ex_eval.h to ex_eval_defs.h (#19739)
This avoids including ex_eval.h in any other header, thus preventing
future circular includes.
Diffstat (limited to 'src/nvim/ex_eval.c')
-rw-r--r-- | src/nvim/ex_eval.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/ex_eval.c b/src/nvim/ex_eval.c index f67c8a6720..4e50a51a8a 100644 --- a/src/nvim/ex_eval.c +++ b/src/nvim/ex_eval.c @@ -151,8 +151,8 @@ int aborted_in_try(void) bool cause_errthrow(const char *mesg, bool severe, bool *ignore) FUNC_ATTR_NONNULL_ALL { - struct msglist *elem; - struct msglist **plist; + msglist_T *elem; + msglist_T **plist; /* * Do nothing when displaying the interrupt message or reporting an @@ -254,7 +254,7 @@ bool cause_errthrow(const char *mesg, bool severe, bool *ignore) plist = &(*plist)->next; } - elem = xmalloc(sizeof(struct msglist)); + elem = xmalloc(sizeof(msglist_T)); elem->msg = xstrdup(mesg); elem->next = NULL; elem->throw_msg = NULL; @@ -281,9 +281,9 @@ bool cause_errthrow(const char *mesg, bool severe, bool *ignore) } /// Free a "msg_list" and the messages it contains. -static void free_msglist(struct msglist *l) +static void free_msglist(msglist_T *l) { - struct msglist *messages, *next; + msglist_T *messages, *next; messages = l; while (messages != NULL) { @@ -389,7 +389,7 @@ char *get_exception_string(void *value, except_type_T type, char *cmdname, int * if (type == ET_ERROR) { *should_free = true; - mesg = ((struct msglist *)value)->throw_msg; + mesg = ((msglist_T *)value)->throw_msg; if (cmdname != NULL && *cmdname != NUL) { size_t cmdlen = STRLEN(cmdname); ret = xstrnsave("Vim(", 4 + cmdlen + 2 + STRLEN(mesg)); @@ -469,7 +469,7 @@ static int throw_exception(void *value, except_type_T type, char *cmdname) if (type == ET_ERROR) { // Store the original message and prefix the exception value with // "Vim:" or, if a command name is given, "Vim(cmdname):". - excp->messages = (struct msglist *)value; + excp->messages = (msglist_T *)value; } excp->value = get_exception_string(value, type, cmdname, &should_free); |