diff options
author | dundargoc <gocdundar@gmail.com> | 2023-09-29 14:58:48 +0200 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-10-09 11:45:46 +0200 |
commit | 8e932480f61d6101bf8bea1abc07ed93826221fd (patch) | |
tree | 06cf8d0af6e786aba6d01343c54ba52b01738daa /src/nvim/menu.c | |
parent | dacd34364ff3af98bc2d357c43e3ce06638e2ce9 (diff) | |
download | rneovim-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/menu.c')
-rw-r--r-- | src/nvim/menu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/menu.c b/src/nvim/menu.c index 4a72464527..5eb8b41015 100644 --- a/src/nvim/menu.c +++ b/src/nvim/menu.c @@ -78,7 +78,7 @@ void ex_menu(exarg_T *eap) char *arg; char *p; int i; - long pri_tab[MENUDEPTH + 1]; + int pri_tab[MENUDEPTH + 1]; TriState enable = kNone; // kTrue for "menu enable", // kFalse for "menu disable vimmenu_T menuarg; @@ -129,7 +129,7 @@ void ex_menu(exarg_T *eap) } if (ascii_iswhite(*p)) { for (i = 0; i < MENUDEPTH && !ascii_iswhite(*arg); i++) { - pri_tab[i] = getdigits_long(&arg, false, 0); + pri_tab[i] = getdigits_int(&arg, false, 0); if (pri_tab[i] == 0) { pri_tab[i] = 500; } @@ -265,7 +265,7 @@ theend: /// @param[out] menuarg menu entry /// @param[] pri_tab priority table /// @param[in] call_data Right hand side command -static int add_menu_path(const char *const menu_path, vimmenu_T *menuarg, const long *const pri_tab, +static int add_menu_path(const char *const menu_path, vimmenu_T *menuarg, const int *const pri_tab, const char *const call_data) { char *path_name; @@ -366,7 +366,7 @@ static int add_menu_path(const char *const menu_path, vimmenu_T *menuarg, const menu->en_name = NULL; menu->en_dname = NULL; } - menu->priority = (int)pri_tab[pri_idx]; + menu->priority = pri_tab[pri_idx]; menu->parent = parent; // Add after menu that has lower priority. |