From 8e932480f61d6101bf8bea1abc07ed93826221fd Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 29 Sep 2023 14:58:48 +0200 Subject: refactor: the long goodbye long is 32 bits on windows, while it is 64 bits on other architectures. This makes the type suboptimal for a codebase meant to be cross-platform. Replace it with more appropriate integer types. --- src/nvim/usercmd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nvim/usercmd.c') diff --git a/src/nvim/usercmd.c b/src/nvim/usercmd.c index 4bab3f52cd..e7fa7cec2c 100644 --- a/src/nvim/usercmd.c +++ b/src/nvim/usercmd.c @@ -706,7 +706,7 @@ int parse_compl_arg(const char *value, int vallen, int *complp, uint32_t *argt, return OK; } -static int uc_scan_attr(char *attr, size_t len, uint32_t *argt, long *def, int *flags, int *complp, +static int uc_scan_attr(char *attr, size_t len, uint32_t *argt, int *def, int *flags, int *complp, char **compl_arg, cmd_addr_T *addr_type_arg) FUNC_ATTR_NONNULL_ALL { @@ -773,7 +773,7 @@ two_count: return FAIL; } - *def = getdigits_long(&p, true, 0); + *def = getdigits_int(&p, true, 0); *argt |= EX_ZEROR; if (p != val + vallen || vallen == 0) { @@ -799,7 +799,7 @@ invalid_count: goto two_count; } - *def = getdigits_long(&p, true, 0); + *def = getdigits_int(&p, true, 0); if (p != val + vallen) { goto invalid_count; @@ -975,7 +975,7 @@ void ex_command(exarg_T *eap) { char *end; uint32_t argt = 0; - long def = -1; + int def = -1; int flags = 0; int context = EXPAND_NOTHING; char *compl_arg = NULL; -- cgit