From c8c930ea785aa393ebc819139913a9e05f0ccd45 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 11 Feb 2023 10:24:46 +0100 Subject: refactor: reduce scope of locals as per the style guide (#22206) --- src/nvim/profile.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/nvim/profile.c') diff --git a/src/nvim/profile.c b/src/nvim/profile.c index fd024f2d38..173332a428 100644 --- a/src/nvim/profile.c +++ b/src/nvim/profile.c @@ -689,10 +689,8 @@ void profile_init(scriptitem_T *si) /// @param tm place to store wait time void script_prof_save(proftime_T *tm) { - scriptitem_T *si; - if (current_sctx.sc_sid > 0 && current_sctx.sc_sid <= script_items.ga_len) { - si = &SCRIPT_ITEM(current_sctx.sc_sid); + scriptitem_T *si = &SCRIPT_ITEM(current_sctx.sc_sid); if (si->sn_prof_on && si->sn_pr_nest++ == 0) { si->sn_pr_child = profile_start(); } @@ -720,12 +718,11 @@ void script_prof_restore(const proftime_T *tm) /// Dump the profiling results for all scripts in file "fd". static void script_dump_profile(FILE *fd) { - scriptitem_T *si; FILE *sfd; sn_prl_T *pp; for (int id = 1; id <= script_items.ga_len; id++) { - si = &SCRIPT_ITEM(id); + scriptitem_T *si = &SCRIPT_ITEM(id); if (si->sn_prof_on) { fprintf(fd, "SCRIPT %s\n", si->sn_name); if (si->sn_pr_count == 1) { @@ -808,7 +805,6 @@ void profile_dump(void) void script_line_start(void) { scriptitem_T *si; - sn_prl_T *pp; if (current_sctx.sc_sid <= 0 || current_sctx.sc_sid > script_items.ga_len) { return; @@ -822,7 +818,7 @@ void script_line_start(void) while (si->sn_prl_ga.ga_len <= si->sn_prl_idx && si->sn_prl_ga.ga_len < si->sn_prl_ga.ga_maxlen) { // Zero counters for a line that was not used before. - pp = &PRL_ITEM(si, si->sn_prl_ga.ga_len); + sn_prl_T *pp = &PRL_ITEM(si, si->sn_prl_ga.ga_len); pp->snp_count = 0; pp->sn_prl_total = profile_zero(); pp->sn_prl_self = profile_zero(); @@ -853,7 +849,6 @@ void script_line_exec(void) void script_line_end(void) { scriptitem_T *si; - sn_prl_T *pp; if (current_sctx.sc_sid <= 0 || current_sctx.sc_sid > script_items.ga_len) { return; @@ -862,7 +857,7 @@ void script_line_end(void) if (si->sn_prof_on && si->sn_prl_idx >= 0 && si->sn_prl_idx < si->sn_prl_ga.ga_len) { if (si->sn_prl_execed) { - pp = &PRL_ITEM(si, si->sn_prl_idx); + sn_prl_T *pp = &PRL_ITEM(si, si->sn_prl_idx); pp->snp_count++; si->sn_prl_start = profile_end(si->sn_prl_start); si->sn_prl_start = profile_sub_wait(si->sn_prl_wait, si->sn_prl_start); -- cgit From 0cbbe27e93e87a5336673e0529b011313c51a123 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 16 Feb 2023 11:00:48 +0800 Subject: vim-patch:8.2.0154: reallocating the list of scripts is inefficient Problem: Reallocating the list of scripts is inefficient. Solution: Instead of using a growarray of scriptitem_T, store pointers and allocate each scriptitem_T separately. Also avoids that the growarray pointers change when sourcing a new script. https://github.com/vim/vim/commit/21b9e9773d64de40994f8762173bdd8befa6acf7 Co-authored-by: Bram Moolenaar --- src/nvim/profile.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'src/nvim/profile.c') diff --git a/src/nvim/profile.c b/src/nvim/profile.c index 173332a428..6b841bd961 100644 --- a/src/nvim/profile.c +++ b/src/nvim/profile.c @@ -232,7 +232,7 @@ void profile_reset(void) { // Reset sourced files. for (int id = 1; id <= script_items.ga_len; id++) { - scriptitem_T *si = &SCRIPT_ITEM(id); + scriptitem_T *si = SCRIPT_ITEM(id); if (si->sn_prof_on) { si->sn_prof_on = false; si->sn_pr_force = false; @@ -407,7 +407,7 @@ bool prof_def_func(void) FUNC_ATTR_PURE { if (current_sctx.sc_sid > 0) { - return SCRIPT_ITEM(current_sctx.sc_sid).sn_pr_force; + return SCRIPT_ITEM(current_sctx.sc_sid)->sn_pr_force; } return false; } @@ -690,7 +690,7 @@ void profile_init(scriptitem_T *si) void script_prof_save(proftime_T *tm) { if (current_sctx.sc_sid > 0 && current_sctx.sc_sid <= script_items.ga_len) { - scriptitem_T *si = &SCRIPT_ITEM(current_sctx.sc_sid); + scriptitem_T *si = SCRIPT_ITEM(current_sctx.sc_sid); if (si->sn_prof_on && si->sn_pr_nest++ == 0) { si->sn_pr_child = profile_start(); } @@ -705,7 +705,7 @@ void script_prof_restore(const proftime_T *tm) return; } - scriptitem_T *si = &SCRIPT_ITEM(current_sctx.sc_sid); + scriptitem_T *si = SCRIPT_ITEM(current_sctx.sc_sid); if (si->sn_prof_on && --si->sn_pr_nest == 0) { si->sn_pr_child = profile_end(si->sn_pr_child); // don't count wait time @@ -722,7 +722,7 @@ static void script_dump_profile(FILE *fd) sn_prl_T *pp; for (int id = 1; id <= script_items.ga_len; id++) { - scriptitem_T *si = &SCRIPT_ITEM(id); + scriptitem_T *si = SCRIPT_ITEM(id); if (si->sn_prof_on) { fprintf(fd, "SCRIPT %s\n", si->sn_name); if (si->sn_pr_count == 1) { @@ -804,12 +804,10 @@ void profile_dump(void) /// until later and we need to store the time now. void script_line_start(void) { - scriptitem_T *si; - if (current_sctx.sc_sid <= 0 || current_sctx.sc_sid > script_items.ga_len) { return; } - si = &SCRIPT_ITEM(current_sctx.sc_sid); + scriptitem_T *si = SCRIPT_ITEM(current_sctx.sc_sid); if (si->sn_prof_on && SOURCING_LNUM >= 1) { // Grow the array before starting the timer, so that the time spent // here isn't counted. @@ -834,12 +832,10 @@ void script_line_start(void) /// Called when actually executing a function line. void script_line_exec(void) { - scriptitem_T *si; - if (current_sctx.sc_sid <= 0 || current_sctx.sc_sid > script_items.ga_len) { return; } - si = &SCRIPT_ITEM(current_sctx.sc_sid); + scriptitem_T *si = SCRIPT_ITEM(current_sctx.sc_sid); if (si->sn_prof_on && si->sn_prl_idx >= 0) { si->sn_prl_execed = true; } @@ -848,12 +844,10 @@ void script_line_exec(void) /// Called when done with a function line. void script_line_end(void) { - scriptitem_T *si; - if (current_sctx.sc_sid <= 0 || current_sctx.sc_sid > script_items.ga_len) { return; } - si = &SCRIPT_ITEM(current_sctx.sc_sid); + scriptitem_T *si = SCRIPT_ITEM(current_sctx.sc_sid); if (si->sn_prof_on && si->sn_prl_idx >= 0 && si->sn_prl_idx < si->sn_prl_ga.ga_len) { if (si->sn_prl_execed) { -- cgit From 42e55ba009ecc14afa1b519c8de02cb30c0d1671 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 16 Apr 2023 16:57:25 +0800 Subject: vim-patch:9.0.0398: members of funccall_T are inconsistently named (#23123) Problem: Members of funccall_T are inconsistently named. Solution: Use the "fc_" prefix for all members. https://github.com/vim/vim/commit/ca16c60f337ed33d5dd66a6e90aaf95b619c5e47 Co-authored-by: Bram Moolenaar --- src/nvim/profile.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/nvim/profile.c') diff --git a/src/nvim/profile.c b/src/nvim/profile.c index 6b841bd961..d8ba4741bc 100644 --- a/src/nvim/profile.c +++ b/src/nvim/profile.c @@ -513,8 +513,8 @@ void prof_child_enter(proftime_T *tm) { funccall_T *fc = get_current_funccal(); - if (fc != NULL && fc->func->uf_profiling) { - fc->prof_child = profile_start(); + if (fc != NULL && fc->fc_func->uf_profiling) { + fc->fc_prof_child = profile_start(); } script_prof_save(tm); @@ -528,14 +528,14 @@ void prof_child_exit(proftime_T *tm) { funccall_T *fc = get_current_funccal(); - if (fc != NULL && fc->func->uf_profiling) { - fc->prof_child = profile_end(fc->prof_child); + if (fc != NULL && fc->fc_func->uf_profiling) { + fc->fc_prof_child = profile_end(fc->fc_prof_child); // don't count waiting time - fc->prof_child = profile_sub_wait(*tm, fc->prof_child); - fc->func->uf_tm_children = - profile_add(fc->func->uf_tm_children, fc->prof_child); - fc->func->uf_tml_children = - profile_add(fc->func->uf_tml_children, fc->prof_child); + fc->fc_prof_child = profile_sub_wait(*tm, fc->fc_prof_child); + fc->fc_func->uf_tm_children = + profile_add(fc->fc_func->uf_tm_children, fc->fc_prof_child); + fc->fc_func->uf_tml_children = + profile_add(fc->fc_func->uf_tml_children, fc->fc_prof_child); } script_prof_restore(tm); } @@ -547,7 +547,7 @@ void prof_child_exit(proftime_T *tm) void func_line_start(void *cookie) { funccall_T *fcp = (funccall_T *)cookie; - ufunc_T *fp = fcp->func; + ufunc_T *fp = fcp->fc_func; if (fp->uf_profiling && SOURCING_LNUM >= 1 && SOURCING_LNUM <= fp->uf_lines.ga_len) { fp->uf_tml_idx = SOURCING_LNUM - 1; @@ -566,7 +566,7 @@ void func_line_start(void *cookie) void func_line_exec(void *cookie) { funccall_T *fcp = (funccall_T *)cookie; - ufunc_T *fp = fcp->func; + ufunc_T *fp = fcp->fc_func; if (fp->uf_profiling && fp->uf_tml_idx >= 0) { fp->uf_tml_execed = true; @@ -577,7 +577,7 @@ void func_line_exec(void *cookie) void func_line_end(void *cookie) { funccall_T *fcp = (funccall_T *)cookie; - ufunc_T *fp = fcp->func; + ufunc_T *fp = fcp->fc_func; if (fp->uf_profiling && fp->uf_tml_idx >= 0) { if (fp->uf_tml_execed) { -- cgit From dc6d0d2daf69e2fdadda81feb97906dbc962a239 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 30 Sep 2023 14:41:34 +0800 Subject: refactor: reorganize option header files (#25437) - Move vimoption_T to option.h - option_defs.h is for option-related types - option_vars.h corresponds to Vim's option.h - option_defs.h and option_vars.h don't include each other --- src/nvim/profile.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/nvim/profile.c') diff --git a/src/nvim/profile.c b/src/nvim/profile.c index d8ba4741bc..3162a446c0 100644 --- a/src/nvim/profile.c +++ b/src/nvim/profile.c @@ -24,7 +24,6 @@ #include "nvim/keycodes.h" #include "nvim/memory.h" #include "nvim/message.h" -#include "nvim/option_defs.h" #include "nvim/os/os.h" #include "nvim/os/time.h" #include "nvim/pos.h" -- cgit From 09a17f91d0d362c6e58bfdbe3ccdeacffb0b44b9 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 2 Oct 2023 10:45:33 +0800 Subject: refactor: move cmdline completion types to cmdexpand_defs.h (#25465) --- src/nvim/profile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/profile.c') diff --git a/src/nvim/profile.c b/src/nvim/profile.c index 3162a446c0..73ad534de7 100644 --- a/src/nvim/profile.c +++ b/src/nvim/profile.c @@ -11,6 +11,7 @@ #include "nvim/ascii.h" #include "nvim/charset.h" +#include "nvim/cmdexpand_defs.h" #include "nvim/debugger.h" #include "nvim/eval.h" #include "nvim/eval/typval_defs.h" @@ -30,7 +31,6 @@ #include "nvim/profile.h" #include "nvim/runtime.h" #include "nvim/types.h" -#include "nvim/vim.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "profile.c.generated.h" -- cgit From 5f03a1eaabfc8de2b3a9c666fcd604763f41e152 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 20 Oct 2023 15:10:33 +0200 Subject: build(lint): remove unnecessary clint.py rules Uncrustify is the source of truth where possible. Remove any redundant checks from clint.py. --- src/nvim/profile.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/nvim/profile.c') diff --git a/src/nvim/profile.c b/src/nvim/profile.c index 73ad534de7..1ce1cf5ad7 100644 --- a/src/nvim/profile.c +++ b/src/nvim/profile.c @@ -233,21 +233,21 @@ void profile_reset(void) for (int id = 1; id <= script_items.ga_len; id++) { scriptitem_T *si = SCRIPT_ITEM(id); if (si->sn_prof_on) { - si->sn_prof_on = false; - si->sn_pr_force = false; - si->sn_pr_child = profile_zero(); - si->sn_pr_nest = 0; - si->sn_pr_count = 0; - si->sn_pr_total = profile_zero(); - si->sn_pr_self = profile_zero(); - si->sn_pr_start = profile_zero(); - si->sn_pr_children = profile_zero(); + si->sn_prof_on = false; + si->sn_pr_force = false; + si->sn_pr_child = profile_zero(); + si->sn_pr_nest = 0; + si->sn_pr_count = 0; + si->sn_pr_total = profile_zero(); + si->sn_pr_self = profile_zero(); + si->sn_pr_start = profile_zero(); + si->sn_pr_children = profile_zero(); ga_clear(&si->sn_prl_ga); - si->sn_prl_start = profile_zero(); + si->sn_prl_start = profile_zero(); si->sn_prl_children = profile_zero(); - si->sn_prl_wait = profile_zero(); - si->sn_prl_idx = -1; - si->sn_prl_execed = 0; + si->sn_prl_wait = profile_zero(); + si->sn_prl_idx = -1; + si->sn_prl_execed = 0; } } @@ -261,22 +261,22 @@ void profile_reset(void) todo--; ufunc_T *uf = HI2UF(hi); if (uf->uf_prof_initialized) { - uf->uf_profiling = 0; - uf->uf_tm_count = 0; - uf->uf_tm_total = profile_zero(); - uf->uf_tm_self = profile_zero(); - uf->uf_tm_children = profile_zero(); + uf->uf_profiling = 0; + uf->uf_tm_count = 0; + uf->uf_tm_total = profile_zero(); + uf->uf_tm_self = profile_zero(); + uf->uf_tm_children = profile_zero(); for (int i = 0; i < uf->uf_lines.ga_len; i++) { uf->uf_tml_count[i] = 0; uf->uf_tml_total[i] = uf->uf_tml_self[i] = 0; } - uf->uf_tml_start = profile_zero(); + uf->uf_tml_start = profile_zero(); uf->uf_tml_children = profile_zero(); - uf->uf_tml_wait = profile_zero(); - uf->uf_tml_idx = -1; - uf->uf_tml_execed = 0; + uf->uf_tml_wait = profile_zero(); + uf->uf_tml_idx = -1; + uf->uf_tml_execed = 0; } } } -- cgit From acc646ad8fc3ef11fcc63b69f3d8484e4a91accd 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/profile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/profile.c') diff --git a/src/nvim/profile.c b/src/nvim/profile.c index 1ce1cf5ad7..69be4ba5fd 100644 --- a/src/nvim/profile.c +++ b/src/nvim/profile.c @@ -301,13 +301,13 @@ void ex_profile(exarg_T *eap) profile_fname = expand_env_save_opt(e, true); do_profiling = PROF_YES; profile_set_wait(profile_zero()); - set_vim_var_nr(VV_PROFILING, 1L); + set_vim_var_nr(VV_PROFILING, 1); } else if (do_profiling == PROF_NONE) { emsg(_("E750: First use \":profile start {fname}\"")); } else if (strcmp(eap->arg, "stop") == 0) { profile_dump(); do_profiling = PROF_NONE; - set_vim_var_nr(VV_PROFILING, 0L); + set_vim_var_nr(VV_PROFILING, 0); profile_reset(); } else if (strcmp(eap->arg, "pause") == 0) { if (do_profiling == PROF_YES) { -- cgit From 353a4be7e84fdc101318215bdcc8a7e780d737fe Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 12 Nov 2023 13:13:58 +0100 Subject: build: remove PVS We already have an extensive suite of static analysis tools we use, which causes a fair bit of redundancy as we get duplicate warnings. PVS is also prone to give false warnings which creates a lot of work to identify and disable. --- src/nvim/profile.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/nvim/profile.c') diff --git a/src/nvim/profile.c b/src/nvim/profile.c index 69be4ba5fd..3e824fc34f 100644 --- a/src/nvim/profile.c +++ b/src/nvim/profile.c @@ -1,6 +1,3 @@ -// 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 - #include #include #include -- cgit From 28f4f3c48498086307ed825d1761edb5789ca0e8 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 12 Nov 2023 15:54:54 +0100 Subject: refactor: follow style guide - reduce variable scope - prefer initialization over declaration and assignment - use bool to represent boolean values --- src/nvim/profile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/nvim/profile.c') diff --git a/src/nvim/profile.c b/src/nvim/profile.c index 3e824fc34f..80f613c096 100644 --- a/src/nvim/profile.c +++ b/src/nvim/profile.c @@ -434,12 +434,11 @@ static void prof_func_line(FILE *fd, int count, const proftime_T *total, const p /// @param prefer_self when equal print only self time static void prof_sort_list(FILE *fd, ufunc_T **sorttab, int st_len, char *title, bool prefer_self) { - int i; ufunc_T *fp; fprintf(fd, "FUNCTIONS SORTED ON %s TIME\n", title); fprintf(fd, "count total (s) self (s) function\n"); - for (i = 0; i < 20 && i < st_len; i++) { + for (int i = 0; i < 20 && i < st_len; i++) { fp = sorttab[i]; prof_func_line(fd, fp->uf_tm_count, &fp->uf_tm_total, &fp->uf_tm_self, prefer_self); -- cgit From ac1113ded5f8f09dd99a9894d7a7e795626fb728 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 13 Nov 2023 23:40:37 +0100 Subject: refactor: follow style guide - reduce variable scope - prefer initialization over declaration and assignment --- src/nvim/profile.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'src/nvim/profile.c') diff --git a/src/nvim/profile.c b/src/nvim/profile.c index 80f613c096..fd6c316e38 100644 --- a/src/nvim/profile.c +++ b/src/nvim/profile.c @@ -286,11 +286,8 @@ void ex_profile(exarg_T *eap) { static proftime_T pause_time; - char *e; - int len; - - e = skiptowhite(eap->arg); - len = (int)(e - eap->arg); + char *e = skiptowhite(eap->arg); + int len = (int)(e - eap->arg); e = skipwhite(e); if (len == 5 && strncmp(eap->arg, "start", 5) == 0 && *e != NUL) { @@ -434,12 +431,10 @@ static void prof_func_line(FILE *fd, int count, const proftime_T *total, const p /// @param prefer_self when equal print only self time static void prof_sort_list(FILE *fd, ufunc_T **sorttab, int st_len, char *title, bool prefer_self) { - ufunc_T *fp; - fprintf(fd, "FUNCTIONS SORTED ON %s TIME\n", title); fprintf(fd, "count total (s) self (s) function\n"); for (int i = 0; i < 20 && i < st_len; i++) { - fp = sorttab[i]; + ufunc_T *fp = sorttab[i]; prof_func_line(fd, fp->uf_tm_count, &fp->uf_tm_total, &fp->uf_tm_self, prefer_self); if ((uint8_t)fp->uf_name[0] == K_SPECIAL) { @@ -593,23 +588,19 @@ void func_line_end(void *cookie) static void func_dump_profile(FILE *fd) { hashtab_T *const functbl = func_tbl_get(); - hashitem_T *hi; - int todo; - ufunc_T *fp; - ufunc_T **sorttab; int st_len = 0; - todo = (int)functbl->ht_used; + int todo = (int)functbl->ht_used; if (todo == 0) { return; // nothing to dump } - sorttab = xmalloc(sizeof(ufunc_T *) * (size_t)todo); + ufunc_T **sorttab = xmalloc(sizeof(ufunc_T *) * (size_t)todo); - for (hi = functbl->ht_array; todo > 0; hi++) { + for (hashitem_T *hi = functbl->ht_array; todo > 0; hi++) { if (!HASHITEM_EMPTY(hi)) { todo--; - fp = HI2UF(hi); + ufunc_T *fp = HI2UF(hi); if (fp->uf_prof_initialized) { sorttab[st_len++] = fp; @@ -713,7 +704,6 @@ void script_prof_restore(const proftime_T *tm) /// Dump the profiling results for all scripts in file "fd". static void script_dump_profile(FILE *fd) { - FILE *sfd; sn_prl_T *pp; for (int id = 1; id <= script_items.ga_len; id++) { @@ -730,7 +720,7 @@ static void script_dump_profile(FILE *fd) fprintf(fd, "\n"); fprintf(fd, "count total (s) self (s)\n"); - sfd = os_fopen(si->sn_name, "r"); + FILE *sfd = os_fopen(si->sn_name, "r"); if (sfd == NULL) { fprintf(fd, "Cannot open file!\n"); } else { -- cgit From 38a20dd89f91c45ec8589bf1c50d50732882d38a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 27 Nov 2023 20:58:37 +0800 Subject: build(IWYU): replace most private mappings with pragmas (#26247) --- src/nvim/profile.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/profile.c') diff --git a/src/nvim/profile.c b/src/nvim/profile.c index fd6c316e38..0c771d2dfe 100644 --- a/src/nvim/profile.c +++ b/src/nvim/profile.c @@ -22,6 +22,7 @@ #include "nvim/keycodes.h" #include "nvim/memory.h" #include "nvim/message.h" +#include "nvim/os/fs.h" #include "nvim/os/os.h" #include "nvim/os/time.h" #include "nvim/pos.h" -- cgit From 8b428ca8b79ebb7b36c3e403ff3bcb6924a635a6 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 27 Nov 2023 16:00:21 +0100 Subject: build(IWYU): fix includes for func_attr.h --- src/nvim/profile.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/profile.c') diff --git a/src/nvim/profile.c b/src/nvim/profile.c index 0c771d2dfe..d42f2aceeb 100644 --- a/src/nvim/profile.c +++ b/src/nvim/profile.c @@ -15,6 +15,7 @@ #include "nvim/eval/userfunc.h" #include "nvim/ex_cmds_defs.h" #include "nvim/fileio.h" +#include "nvim/func_attr.h" #include "nvim/garray.h" #include "nvim/gettext.h" #include "nvim/globals.h" -- cgit From f4aedbae4cb1f206f5b7c6142697b71dd473059b Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 27 Nov 2023 18:39:38 +0100 Subject: build(IWYU): fix includes for undo_defs.h --- src/nvim/profile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/profile.c') diff --git a/src/nvim/profile.c b/src/nvim/profile.c index d42f2aceeb..e65d6ae1d3 100644 --- a/src/nvim/profile.c +++ b/src/nvim/profile.c @@ -26,7 +26,7 @@ #include "nvim/os/fs.h" #include "nvim/os/os.h" #include "nvim/os/time.h" -#include "nvim/pos.h" +#include "nvim/pos_defs.h" #include "nvim/profile.h" #include "nvim/runtime.h" #include "nvim/types.h" -- cgit From 6c14ae6bfaf51415b555e9a6b85d1d280976358d Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 27 Nov 2023 20:27:32 +0100 Subject: refactor: rename types.h to types_defs.h --- src/nvim/profile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/profile.c') diff --git a/src/nvim/profile.c b/src/nvim/profile.c index e65d6ae1d3..8c98700ee2 100644 --- a/src/nvim/profile.c +++ b/src/nvim/profile.c @@ -29,7 +29,7 @@ #include "nvim/pos_defs.h" #include "nvim/profile.h" #include "nvim/runtime.h" -#include "nvim/types.h" +#include "nvim/types_defs.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "profile.c.generated.h" -- cgit From 79b6ff28ad1204fbb4199b9092f5c578d88cb28e Mon Sep 17 00:00:00 2001 From: dundargoc Date: Tue, 28 Nov 2023 20:31:00 +0100 Subject: refactor: fix headers with IWYU --- src/nvim/profile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/profile.c') diff --git a/src/nvim/profile.c b/src/nvim/profile.c index 8c98700ee2..53ff57dacb 100644 --- a/src/nvim/profile.c +++ b/src/nvim/profile.c @@ -6,7 +6,7 @@ #include #include -#include "nvim/ascii.h" +#include "nvim/ascii_defs.h" #include "nvim/charset.h" #include "nvim/cmdexpand_defs.h" #include "nvim/debugger.h" -- cgit