[vim/vim] Add a macro to iterate over all the grow array items (PR #12120)

11 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Mar 8, 2023, 12:43:51 AM3/8/23
to vim/vim, Subscribed

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/12120

Commit Summary

  • 8f1240a Add a macro to iterate over all the grow array items

File Changes

(43 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12120@github.com>

Yegappan Lakshmanan

unread,
Mar 8, 2023, 12:48:34 AM3/8/23
to vim/vim, Push

@yegappan pushed 1 commit.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12120/push/12864178618@github.com>

Yegappan Lakshmanan

unread,
Mar 8, 2023, 12:53:06 AM3/8/23
to vim/vim, Push

@yegappan pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12120/push/12864206948@github.com>

codecov[bot]

unread,
Mar 8, 2023, 1:05:27 AM3/8/23
to vim/vim, Subscribed

Codecov Report

Merging #12120 (b1eafc4) into master (7ac5023) will decrease coverage by 0.82%.
The diff coverage is 97.02%.

@@            Coverage Diff             @@
##           master   #12120      +/-   ##
==========================================
- Coverage   81.93%   81.11%   -0.82%     
==========================================
  Files         164      154      -10     
  Lines      194067   183608   -10459     
  Branches    43829    41239    -2590     
==========================================
- Hits       159009   148939   -10070     
+ Misses      22225    21723     -502     
- Partials    12833    12946     +113     
Flag Coverage Δ
huge-clang-none 82.65% <97.02%> (+<0.01%) ⬆️
huge-gcc-none ?
huge-gcc-testgui ?
huge-gcc-unittests 0.29% <0.00%> (ø)
linux 81.11% <97.02%> (-1.25%) ⬇️
mingw-x64-HUGE ?
mingw-x86-HUGE ?
windows ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/ex_cmds2.c 78.98% <0.00%> (-2.18%) ⬇️
src/vim9type.c 87.00% <50.00%> (-3.06%) ⬇️
src/syntax.c 79.61% <83.33%> (-0.77%) ⬇️
src/highlight.c 78.83% <85.71%> (-2.69%) ⬇️
src/vim9class.c 80.35% <93.75%> (-1.43%) ⬇️
src/alloc.c 78.21% <100.00%> (ø)
src/autocmd.c 86.08% <100.00%> (-1.43%) ⬇️
src/blob.c 89.87% <100.00%> (-2.08%) ⬇️
src/channel.c 82.50% <100.00%> (-0.60%) ⬇️
src/debugger.c 88.70% <100.00%> (-3.43%) ⬇️
... and 177 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12120/c1459594393@github.com>

Bram Moolenaar

unread,
Mar 8, 2023, 4:59:40 PM3/8/23
to vim/vim, Subscribed


Yegappan wrote:

> * Add a macro to iterate over all the grow array items

Hmm, I'm not sure this is really an improvement. There isn't any
complexity that the macro takes care of, and it shortens the code only a
little bit. A disadvantage is that it obscures what the for loop really
does. And inlining the declaration of the loop variable would require
another macro.

What do others think?

--
hundred-and-one symptoms of being an internet addict:
250. You've given up the search for the "perfect woman" and instead,
sit in front of the PC until you're just too tired to care.

/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12120/c1460932207@github.com>

Yegappan Lakshmanan

unread,
Mar 8, 2023, 7:33:38 PM3/8/23
to vim/vim, Push

@yegappan pushed 1 commit.

  • 1d46027 Add a macro to iterate over all the grow array items

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12120/push/12875726047@github.com>

Yegappan Lakshmanan

unread,
Mar 8, 2023, 9:08:29 PM3/8/23
to vim...@googlegroups.com, reply+ACY5DGCWWC4BHOOSYS...@reply.github.com, vim/vim, Subscribed
Hi Bram,

On Wed, Mar 8, 2023 at 1:59 PM Bram Moolenaar <vim-dev...@256bit.org> wrote:


Yegappan wrote:

> * Add a macro to iterate over all the grow array items

Hmm, I'm not sure this is really an improvement. There isn't any
complexity that the macro takes care of, and it shortens the code only a
little bit. A disadvantage is that it obscures what the for loop really

The macro makes it explicit that we are looping over all the items in a grow array.
So it makes the intent of the loop more apparent (and it is used in many places).
 
does. And inlining the declaration of the loop variable would require
another macro.

Yes.  With this macro, we cannot inline the loop variable declaration.

Regards,
Yegappan
 

What do others think?


vim-dev ML

unread,
Mar 8, 2023, 9:08:47 PM3/8/23
to vim/vim, vim-dev ML, Your activity

Hi Bram,

On Wed, Mar 8, 2023 at 1:59 PM Bram Moolenaar ***@***.***>


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12120/c1461160155@github.com>

Christian Brabandt

unread,
Apr 18, 2024, 6:37:22 PM4/18/24
to vim/vim, vim-dev ML, Comment

@yegappan do you still think this is good to include?


Reply to this email directly, view it on GitHub.

You are receiving this because you commented.Message ID: <vim/vim/pull/12120/c2065437551@github.com>

Christian Brabandt

unread,
Nov 9, 2024, 5:51:37 AM11/9/24
to vim/vim, vim-dev ML, Comment

Closed #12120.


Reply to this email directly, view it on GitHub.

You are receiving this because you commented.Message ID: <vim/vim/pull/12120/issue_event/15237880276@github.com>

Christian Brabandt

unread,
Nov 9, 2024, 5:51:38 AM11/9/24
to vim/vim, vim-dev ML, Comment

closing because seems to have been staled


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: <vim/vim/pull/12120/c2466170095@github.com>

Reply all
Reply to author
Forward
0 new messages