diff options
Diffstat (limited to 'src/nvim/api/options.c')
-rw-r--r-- | src/nvim/api/options.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/nvim/api/options.c b/src/nvim/api/options.c index 4ed676e613..5c9eba163b 100644 --- a/src/nvim/api/options.c +++ b/src/nvim/api/options.c @@ -104,20 +104,20 @@ Object nvim_get_option_value(String name, Dict(option) *opts, Error *err) long numval = 0; char *stringval = NULL; - int result = access_option_value_for(name.data, &numval, &stringval, scope, opt_type, from, - true, err); + getoption_T result = access_option_value_for(name.data, &numval, &stringval, scope, opt_type, + from, true, err); if (ERROR_SET(err)) { return rv; } switch (result) { - case 0: + case gov_string: rv = STRING_OBJ(cstr_as_string(stringval)); break; - case 1: + case gov_number: rv = INTEGER_OBJ(numval); break; - case 2: + case gov_bool: switch (numval) { case 0: case 1: @@ -483,8 +483,8 @@ void set_option_to(uint64_t channel_id, void *to, int type, String name, Object }); } -static int access_option_value(char *key, long *numval, char **stringval, int opt_flags, bool get, - Error *err) +static getoption_T access_option_value(char *key, long *numval, char **stringval, int opt_flags, + bool get, Error *err) { if (get) { return get_option_value(key, numval, stringval, opt_flags); @@ -501,13 +501,13 @@ static int access_option_value(char *key, long *numval, char **stringval, int op } } -static int access_option_value_for(char *key, long *numval, char **stringval, int opt_flags, - int opt_type, void *from, bool get, Error *err) +static getoption_T access_option_value_for(char *key, long *numval, char **stringval, int opt_flags, + int opt_type, void *from, bool get, Error *err) { bool need_switch = false; switchwin_T switchwin; aco_save_T aco; - int result = 0; + getoption_T result = 0; try_start(); switch (opt_type) { |