Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to remove STRLEN() part 6 #14796

Closed
wants to merge 3 commits into from
Closed

Conversation

basilisk0315
Copy link
Contributor

This PR reduces the number of calls to STRLEN() in search.c. There is nothing tricky here but because all of the call sites needed to change, there are 15 source files involved.

Cheers
John

@chrisbra chrisbra closed this in 8c85a2a May 20, 2024
tagp.tagname);
if (!do_search(NULL, '/', '/', pbuf, (long)1,
if (!do_search(NULL, '/', '/', pbuf, len, (long)1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is len used here? Shouldn't this be pbuflen?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've created PR #14817 to correct this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, I missed that during review.

zeertzjq added a commit to zeertzjq/neovim that referenced this pull request May 21, 2024
Problem:  too many strlen() calls in search.c
Solution: refactor code and remove more strlen() calls,
          use explicit variable to remember strlen
          (John Marriott)

closes: vim/vim#14796

vim/vim@8c85a2a

Co-authored-by: John Marriott <basilisk@internode.on.net>
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request May 21, 2024
Problem:  too many strlen() calls in search.c
Solution: refactor code and remove more strlen() calls,
          use explicit variable to remember strlen
          (John Marriott)

closes: vim/vim#14796

vim/vim@8c85a2a

Co-authored-by: John Marriott <basilisk@internode.on.net>
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request May 21, 2024
Problem:  too many strlen() calls in search.c
Solution: refactor code and remove more strlen() calls,
          use explicit variable to remember strlen
          (John Marriott)

closes: vim/vim#14796

vim/vim@8c85a2a

Co-authored-by: John Marriott <basilisk@internode.on.net>
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request May 21, 2024
Problem:  too many strlen() calls in search.c
Solution: refactor code and remove more strlen() calls,
          use explicit variable to remember strlen
          (John Marriott)

closes: vim/vim#14796

vim/vim@8c85a2a

Co-authored-by: John Marriott <basilisk@internode.on.net>
huangyingw pushed a commit to huangyingw/neovim that referenced this pull request May 31, 2024
Problem:  too many strlen() calls in search.c
Solution: refactor code and remove more strlen() calls,
          use explicit variable to remember strlen
          (John Marriott)

closes: vim/vim#14796

vim/vim@8c85a2a

Co-authored-by: John Marriott <basilisk@internode.on.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants