diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-08-11 12:57:37 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-08-11 12:57:37 +0900 |
| commit | ef0b239704c2552f19f4e23d6c206884650a77ac (patch) | |
| tree | dacc7d22899cf699b759a2ce31d897ae6179a3fe /include | |
| parent | 67e2dddb8254fbf4a4eb81c1241ec1963bc77627 (diff) | |
| download | mruby-ef0b239704c2552f19f4e23d6c206884650a77ac.tar.gz mruby-ef0b239704c2552f19f4e23d6c206884650a77ac.zip | |
Remove unnecessary inline function `ary_elt`.
And the function does not conform the naming convention anyway.
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/array.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/include/mruby/array.h b/include/mruby/array.h index a0c642a80..946897a22 100644 --- a/include/mruby/array.h +++ b/include/mruby/array.h @@ -276,15 +276,6 @@ MRB_API mrb_value mrb_ary_join(mrb_state *mrb, mrb_value ary, mrb_value sep); */ MRB_API mrb_value mrb_ary_resize(mrb_state *mrb, mrb_value ary, mrb_int new_len); -static inline mrb_value -ary_elt(mrb_value ary, mrb_int offset) -{ - if (offset < 0 || RARRAY_LEN(ary) <= offset) { - return mrb_nil_value(); - } - return RARRAY_PTR(ary)[offset]; -} - MRB_END_DECL #endif /* MRUBY_ARRAY_H */ |
