aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/usercmd.c
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-09-29 14:58:48 +0200
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-10-09 11:45:46 +0200
commit8e932480f61d6101bf8bea1abc07ed93826221fd (patch)
tree06cf8d0af6e786aba6d01343c54ba52b01738daa /src/nvim/usercmd.c
parentdacd34364ff3af98bc2d357c43e3ce06638e2ce9 (diff)
downloadrneovim-8e932480f61d6101bf8bea1abc07ed93826221fd.tar.gz
rneovim-8e932480f61d6101bf8bea1abc07ed93826221fd.tar.bz2
rneovim-8e932480f61d6101bf8bea1abc07ed93826221fd.zip
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.
Diffstat (limited to 'src/nvim/usercmd.c')
-rw-r--r--src/nvim/usercmd.c8
1 files changed, 4 insertions, 4 deletions
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;