-
Notifications
You must be signed in to change notification settings - Fork 781
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
Add mrb_get_args_a() #5596
Add mrb_get_args_a() #5596
Conversation
Made mrb_get_args_v() static
Good points. Updated my branch. |
@dearblue Anything else I need to do ? |
I'm a third party just like you, so I don't have the authority to commit. |
MRB_API mrb_int | ||
mrb_get_args_v(mrb_state *mrb, mrb_args_format format, void** ptr, va_list ap) |
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.
having an MRB_API
(public API) with a va_list
parameter will make it difficult to provide an API and ABI compatible MRB API implementation outside of C. Is it intentional that this function is marked as part of the public API?
Functions with |
yes it does. thank you! |
OK, I will merge this PR (with some updates). |
For reference, the flexible array was introduced by commit 3ab2f93 (mruby#2997). Subsequently changed for compatibility with C++ by commit 2493972 (mruby#5596).
This pull request adds a new function,
mrb_get_args_a()
, which works exactly likemrb_get_args()
except that it takesthe pointer arguments as an array instead of varargs.
I needed to add this for my mruby binder library that I want to release publicly. It allows you to write code like:
(from my test cases)