diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-01-23 14:35:26 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-01-23 14:35:26 +0900 |
| commit | 5e1d923381072ebcbe002d70bc198a6e95c31f50 (patch) | |
| tree | a34b1dd90e3931d91d4cc11666187907f10de877 /src/error.c | |
| parent | 708088c5fafd469d04a1b428fc49b8b7c27607d2 (diff) | |
| download | mruby-5e1d923381072ebcbe002d70bc198a6e95c31f50.tar.gz mruby-5e1d923381072ebcbe002d70bc198a6e95c31f50.zip | |
Changed the behavior of mrb_range_beg_len(); close #3411
The new API is:
int mrb_range_beg_len(mrb, range, &beg, &len, len, trunc)
The new argument `trunc` is a boolean value that specifies
whether the function truncates the range. The new return value
is an integer instead of a boolean, that is:
0: not a range
1: range with proper edges
2: out of range
To get the old behavior, you have to rewrite:
mrb_range_beg_len(mrb, range, &beg, &len, len)
to:
mrn_range_beg_len(mrb, range, &beg, &len, len, TRUE) == 1
[Breaking Change]
Diffstat (limited to 'src/error.c')
0 files changed, 0 insertions, 0 deletions
