-
Notifications
You must be signed in to change notification settings - Fork 8.1k
sys: util: Add GET_ARGS_FIRST_N to get the first N of the args #84190
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
Conversation
| _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(...) |
There was a problem hiding this comment.
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.
|
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
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 <tokita.hiroshi@gmail.com>
Add `GET_ARGS_FIRST_N` tests. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
eb9b927 to
07f82da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer if you could demonstrate a use in tree. Why do we need this?
This is a basic list operation, so it can be used in various ways, but the most typical use is to extract a sublist from a list. |
|
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
Gets the specified number of elements from the beginning of the list.
This is the symmetircal operation as
GET_ARGS_LESS_N.