diff options
| author | dearblue <[email protected]> | 2021-08-21 15:15:20 +0900 |
|---|---|---|
| committer | dearblue <[email protected]> | 2021-08-23 21:58:57 +0900 |
| commit | 66aa184a82aeb51ae5ec73f5b38a2523e31305fe (patch) | |
| tree | 40cc6067cb75b4f58e2d1dffd6e4c8644850761a /include | |
| parent | 6415faabaaa58481d9cc2209792fe2a93e4243ec (diff) | |
| download | mruby-66aa184a82aeb51ae5ec73f5b38a2523e31305fe.tar.gz mruby-66aa184a82aeb51ae5ec73f5b38a2523e31305fe.zip | |
Checks the frozen object with `mrb_get_args()`
This now works with the `+` modifier that can be added after each specifier.
- `nil` is bypassed.
- The `s` and `z` specifiers are received in C as a `const char *`, so adding a `+` modifier will raise an exception.
- The `a` specifier is received in C as `const mrb_value *`, so adding a `+` modifier will raise an exception.
- The `|`, `*`, `&`, `?` and `:` specifiers with `+` modifier raises an exception.
If `!`/`+` exceeds one for each specifier, an exception will occur in the subsequent processing.
This is the same behavior as before.
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mruby.h b/include/mruby.h index 2a6bc7753..45736ba38 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -911,6 +911,13 @@ MRB_API struct RClass* mrb_define_module_under_id(mrb_state *mrb, struct RClass * | `:` | keyword args | {mrb_kwargs} const | Get keyword arguments. @see mrb_kwargs | * * @see mrb_get_args + * + * Immediately after format specifiers it can add format modifiers: + * + * | char | Notes | + * |:----:|-----------------------------------------------------------------------------------------| + * | `!` | Switch to the alternate mode; The behaviour changes depending on the format specifier | + * | `+` | Request a not frozen object; However, except nil value | */ typedef const char *mrb_args_format; |
