diff options
author | Jurica Bradaric <jbradaric@gmail.com> | 2017-07-25 18:53:47 +0200 |
---|---|---|
committer | Jurica Bradaric <jbradaric@gmail.com> | 2017-07-25 19:06:23 +0200 |
commit | 09470eb673e7582e6103173754fff85ee0e1d232 (patch) | |
tree | e1b8e8789aa280563e5c5958b63a27638551ba0e /src/nvim/ex_eval.c | |
parent | 5a0acd09c106fb3cee4243aa366ee1eff04776fd (diff) | |
download | rneovim-09470eb673e7582e6103173754fff85ee0e1d232.tar.gz rneovim-09470eb673e7582e6103173754fff85ee0e1d232.tar.bz2 rneovim-09470eb673e7582e6103173754fff85ee0e1d232.zip |
vim-patch:8.0.0075
Problem: Using number for exception type lacks type checking.
Solution: Use an enum.
https://github.com/vim/vim/commit/8a5883b7488e492419dde7e1637cc72f2d566ba4
Diffstat (limited to 'src/nvim/ex_eval.c')
-rw-r--r-- | src/nvim/ex_eval.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/nvim/ex_eval.c b/src/nvim/ex_eval.c index 5d664b94a8..c029df2f13 100644 --- a/src/nvim/ex_eval.c +++ b/src/nvim/ex_eval.c @@ -374,10 +374,9 @@ int do_intthrow(struct condstack *cstack) return TRUE; } -/* - * Get an exception message that is to be stored in current_exception->value. - */ -char_u *get_exception_string(void *value, int type, char_u *cmdname, int *should_free) +// Get an exception message that is to be stored in current_exception->value. +char_u *get_exception_string(void *value, except_type_T type, char_u *cmdname, + int *should_free) { char_u *ret, *mesg; char_u *p, *val; @@ -435,13 +434,11 @@ char_u *get_exception_string(void *value, int type, char_u *cmdname, int *should } -/* - * Throw a new exception. Return FAIL when out of memory or it was tried to - * throw an illegal user exception. "value" is the exception string for a - * user or interrupt exception, or points to a message list in case of an - * error exception. - */ -static int throw_exception(void *value, int type, char_u *cmdname) +// Throw a new exception. Return FAIL when out of memory or it was tried to +// throw an illegal user exception. "value" is the exception string for a +// user or interrupt exception, or points to a message list in case of an +// error exception. +static int throw_exception(void *value, except_type_T type, char_u *cmdname) { except_T *excp; int should_free; |