summaryrefslogtreecommitdiffhomepage
path: root/src/array.c
AgeCommit message (Collapse)Author
2015-06-01fix two potential cases of signed integer overflowcremno
2014-10-30avoid wrong ArgumentError from mrb_get_args() when surrounding method takes ↵Yukihiro "Matz" Matsumoto
more than one argument; ref #2627
2014-10-30add cast to return from aget_index(); ref #2627Yukihiro "Matz" Matsumoto
2014-10-29Handle Array#[float, int] Close #2626mattn
2014-09-12constify pointer from RARRAY_PTR to detect potential write barrier bugs.Yukihiro "Matz" Matsumoto
if you see compiler errors due to this commit, you'd better to use array-modifying functions, e.g. mrb_ary_set() or mrb_ary_push(), otherwise you might see nasty GC bugs in the future. if you are sure what you are doing, replace `RARRAY_PTR(ary)` by `mrb_ary_ptr(ary)->ptr`. but be warned.
2014-08-18refactor mruby method(fix indent. remove temporary value, duplicate procedure)kkkkkt
2014-08-05Refactor obj_free() in gc.cJun Hiroe
2014-08-04rename obsolete mrb_special_const_p to mrb_immediate_pYukihiro "Matz" Matsumoto
2014-08-04add MRB_API modifiers to mruby API functionsYukihiro "Matz" Matsumoto
2014-07-08Merge pull request #2451 from take-cheeze/remove_mem_out_checkYukihiro "Matz" Matsumoto
Remove unnecessary out of memory check in `ary_expand_capa`.
2014-07-07Remove unnecessary out of memory check in `ary_expand_capa`.take_cheeze
Since `mrb_realloc` raises when failed to allocate memory.
2014-07-06Add new API `mrb_ary_resize`(mruby implementation of `rb_ary_resize`).take_cheeze
2014-07-06reformat else part; ref #2447Yukihiro "Matz" Matsumoto
2014-07-05Reduce allocation in shared RArray clearing.take_cheeze
2014-05-08use mrb_field_write_barrier_value() in array.cYukihiro "Matz" Matsumoto
2014-05-08Make Array#[]= raise IndexError.yui-knk
If second param is negative, Array#[] raise IndexError.
2014-04-27rename `mrb_str_buf_append` to `mrb_str_cat_str`cremno
The new name is better and less confusing, because: - `mrb_str_append` calls `mrb_str_to_str` and this function doesn't - `mrb_str_buf_append` _is_ `mrb_str_cat` for `mrb_value` strings
2014-04-25eliminate plain int except for a few cases like arena_indexYukihiro "Matz" Matsumoto
2014-04-21remove `mrb_str_buf_cat`cremno
It does the same as `mrb_str_cat`.
2014-04-15resolve conflictYukihiro "Matz" Matsumoto
2014-04-02implement part of Array#<=> in CYukihiro "Matz" Matsumoto
2014-04-02implement Array comparisons by RubyYukihiro "Matz" Matsumoto
2014-04-01move Array#inspect implementation to mrblib/array.rbYukihiro "Matz" Matsumoto
2014-03-18add a space after C reserved wordsYukihiro "Matz" Matsumoto
2014-03-18Reduce implicit type casts.Masaki Muranaka
2014-03-01add _FLAG to SET_SHARED macros; ref #1750Yukihiro "Matz" Matsumoto
2014-03-01Merge branch 'array-shared-macro' of https://github.com/ksss/mruby into ↵Yukihiro "Matz" Matsumoto
ksss-array-shared-macro
2014-02-27move check condition to outside in while blockksss
2014-02-27add macro ARY_UNSET_SHAREDksss
2014-02-27add macro ARY_SET_SHAREDksss
2014-02-26add macro ARY_SHARED_Pksss
2014-02-12array implementation: several small changescremno
src/array.c: - make various functions without declaration in the mruby headers static - removed all uncessary int casts and two useless comments mrb_ary_new_from_values: move to similar functions mrb_check_array_type: fix indentation include/mruby/array.h: mrb_shared_array: padding (default "mrbconf.h" on an usual 64-bit system) sizeof(mrb_int)==sizeof(int)==4 && sizeof(mrb_value*)==8 both: mrb_ary_aget: remove declaration in header and make static nobody uses it which is not surprising since it has 1 req arg! mrb_assoc_new: small optimization and move to similar functions mrb_ary_len: re-implement as static inline function (it is used by mrbgems) programmers should directly use RARRAY_LEN instead
2014-02-08made mrb_define_class to return existing class, with heavy refactoringYukihiro "Matz" Matsumoto
2014-02-06use mrb_str_new_lit() more widelyYukihiro "Matz" Matsumoto
2014-02-01fix NODE_SPLAT codegenh2so5
2014-01-30Array#[]= is now range awareYukihiro "Matz" Matsumoto
2014-01-29move range aware aget to array.c from mruby-array-ext gemYukihiro "Matz" Matsumoto
2014-01-07remove superfluous includescremno
- reduce compile time by a little bit (full-core: ~0.7s for me) - thanks to 'include-what-you-use' for some help - include Standard C header files before any other (coding style)
2014-01-04should splat and iterate elements when "*ary" speficied in the case-when ↵Yukihiro "Matz" Matsumoto
clause; close #1627
2014-01-03mrb_ary_splat() to call #to_aYukihiro "Matz" Matsumoto
2014-01-02Merge pull request #1634 from cremno/use-mrb_fixnum_pYukihiro "Matz" Matsumoto
tiny word boxing optimization
2014-01-02remove various preprocessor conditionalscremno
- HAVE_IEEEFP_H is nowhere defined or needed at all - FreeBSD < 4 is unsupported since years - MSVC workaround (around what exactly?)
2014-01-02tiny word boxing optimizationcremno
2013-12-07Fix ISO no in Array#* and Array#+Jun Hiroe
2013-12-01add mrb_intern_lit for creating symbol from string literaltake_cheeze
2013-11-29rename mrb_intern2() to mrb_intern(); huge API incompatibility; close #1513Yukihiro "Matz" Matsumoto
2013-11-01changed argument type of mrb_ary_modify(); ref #1554Yukihiro "Matz" Matsumoto
2013-10-31add mrb_ary_modify(mrb,a); you have to ensure mrb_value a to be an array; ↵Yukihiro "Matz" Matsumoto
ref #1554
2013-07-22change else formattingYukihiro "Matz" Matsumoto
2013-07-18Changed use of MRB_INT_MAX to MRB_INT_MAX-1Carson McDonald