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.
This commit is contained in:
dundargoc
2023-09-29 14:58:48 +02:00
committed by dundargoc
parent c513cbf361
commit acc646ad8f
57 changed files with 362 additions and 367 deletions

View File

@@ -1,9 +1,7 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
//
// sign.c: functions for managing with signs
//
#include <inttypes.h>
#include <stdbool.h>
@@ -732,8 +730,8 @@ static void sign_list_placed(buf_T *rbuf, char *sign_group)
group[0] = '\0';
}
vim_snprintf(lbuf, MSG_BUF_LEN,
_(" line=%ld id=%d%s name=%s priority=%d"),
(long)sign->se_lnum, sign->se_id, group,
_(" line=%" PRIdLINENR " id=%d%s name=%s priority=%d"),
sign->se_lnum, sign->se_id, group,
sign_typenr2name(sign->se_typenr), sign->se_priority);
msg_puts(lbuf);
msg_putchar('\n');
@@ -1622,7 +1620,7 @@ static void sign_get_placed_in_buf(buf_T *buf, linenr_T lnum, int sign_id, const
d = tv_dict_alloc();
tv_list_append_dict(retlist, d);
tv_dict_add_nr(d, S_LEN("bufnr"), (long)buf->b_fnum);
tv_dict_add_nr(d, S_LEN("bufnr"), buf->b_fnum);
l = tv_list_alloc(kListLenMayKnow);
tv_dict_add_list(d, S_LEN("signs"), l);