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

sys: util: Add GET_ARGS_FIRST_N to get the first N of the args #84190

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

soburi
Copy link
Member

@soburi soburi commented Jan 19, 2025

Gets the specified number of elements from the beginning of the list.
This is the symmetircal operation as GET_ARGS_LESS_N.

Gets the specified number of elements from the beginning of the list.
This is the symmetircal operation as `GET_ARGS_LESS_N`.

Signed-off-by: TOKITA Hiroshi <[email protected]>
Add `GET_ARGS_FIRST_N` tests.

Signed-off-by: TOKITA Hiroshi <[email protected]>
@@ -1051,6 +1051,388 @@
_47, _48, _49, _50, _51, _52, _53, _54, _55, \
_56, _57, _58, _59, _60, _61, _62, _63, ...) __VA_ARGS__

#define Z_GET_ARGS_FIRST_0(...)
Copy link
Member Author

Choose a reason for hiding this comment

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

I think the implementation is straightforward.
I'd be happy to hear any comments on whether you think the name is preferable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Base OS Base OS Library (lib/os) area: Testsuite Testsuite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants