Mercurial > vim
diff src/ex_eval.c @ 10361:147f45c283e1 v8.0.0075
commit https://github.com/vim/vim/commit/8a5883b7488e492419dde7e1637cc72f2d566ba4
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 10 20:20:05 2016 +0100
patch 8.0.0075
Problem: Using number for exception type lacks type checking.
Solution: Use an enum.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 10 Nov 2016 20:30:04 +0100 |
parents | 66f1b5bf3fa6 |
children | 50f2a4ad1cfa |
line wrap: on
line diff
--- a/src/ex_eval.c +++ b/src/ex_eval.c @@ -16,7 +16,7 @@ #if defined(FEAT_EVAL) || defined(PROTO) static void free_msglist(struct msglist *l); -static int throw_exception(void *, int, char_u *); +static int throw_exception(void *, except_type_T, char_u *); static char_u *get_end_emsg(struct condstack *cstack); /* @@ -422,7 +422,7 @@ do_intthrow(struct condstack *cstack) char_u * get_exception_string( void *value, - int type, + except_type_T type, char_u *cmdname, int *should_free) { @@ -503,7 +503,7 @@ get_exception_string( * error exception. */ static int -throw_exception(void *value, int type, char_u *cmdname) +throw_exception(void *value, except_type_T type, char_u *cmdname) { except_T *excp; int should_free;