Skip to content

lit_get_magic_string_utf8 can be improved without the need of strlen #4978

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

Open
lygstate opened this issue Feb 9, 2022 · 2 comments · May be fixed by #5192
Open

lit_get_magic_string_utf8 can be improved without the need of strlen #4978

lygstate opened this issue Feb 9, 2022 · 2 comments · May be fixed by #5192
Labels
enhancement An improvement

Comments

@lygstate
Copy link
Contributor

lygstate commented Feb 9, 2022

According to

lit_get_magic_string_utf8 (uint32_t id) /**< magic string id */

We can use lit_magic_strings[id] - lit_magic_strings[id+1] to calcuate the length of lit_magic_strings[id], without the need of strlen.

@ossy-szeged ossy-szeged added the enhancement An improvement label Nov 21, 2024
@ossy-szeged
Copy link
Contributor

There is a similar PR #4982 . @lygstate is that related to this issue?

@lygstate
Copy link
Contributor Author

There is a similar PR #4982 . @lygstate is that related to this issue?

yes partially fixed this issue

@lygstate lygstate linked a pull request Dec 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants