Commit Graph

56 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 429e69243c remove unused inspect_range 2013-08-01 18:29:55 +09:00
Jun Hiroe 8e42868600 Repalace int with mrb_bool because a return value is boolean. 2013-07-15 23:17:12 +09:00
Jun Hiroe 780930cbf5 Refactor mrb_range_beg_len() func in range.c 2013-07-05 21:21:17 +09:00
Yukihiro "Matz" Matsumoto 068087439e Merge pull request #1324 from h2so5/fix-range-equal
Fix Range#==
2013-06-30 14:23:57 -07:00
h2so5 db0eaa6352 Fix Range#== 2013-06-30 23:40:53 +09:00
Jun Hiroe 85ea2f6144 Refactor range_eql() func in rangec.c 2013-06-30 21:30:22 +09:00
Jun Hiroe a2210274ea Refactor mrb_range_eq() func in range.c. 2013-06-30 02:11:37 +09:00
h2so5 1e5b00e772 Remove mrb_class_obj_get 2013-05-01 21:10:17 +09:00
Yukihiro "Matz" Matsumoto 30d580ecbc rename every ARGS_XXX to MRB_ARGS_XXX; ref #1206 2013-04-25 09:47:36 +09:00
h2so5 9b798114bb Use mrb_bool for the 'b' format specifier of mrb_get_args 2013-04-22 10:41:53 +09:00
Yukihiro Matz Matsumoto d0d920e909 rename mrb_true_or_false_value() to mrb_bool_value() 2013-03-19 12:03:54 +09:00
Masaki Muranaka ea5a059969 Use mrb_true_or_false_value() / in range_eql(). 2013-03-19 11:04:23 +09:00
Masaki Muranaka be5986b2b4 Use mrb_true_or_false_value() / in mrb_range_include(). 2013-03-19 11:04:23 +09:00
Masaki Muranaka 90cd202fd1 Use mrb_true_or_false_value() / in mrb_range_eq(). 2013-03-19 11:04:22 +09:00
Masaki Muranaka afcbd6c8ef Use mrb_true_or_false_value() / in mrb_range_excl(). 2013-03-19 11:04:22 +09:00
Masaki Muranaka a11e7f3c30 Remove unused string.h. 2013-03-16 18:08:18 +09:00
Masaki Muranaka 37fd73e376 Clean up range.c. Use mrb_int. Use mrb_vtype. 2013-03-03 13:33:18 +09:00
Masaki Muranaka e4231a0a33 Add typedef to structures that have mrb_ prefix. Use typedef-ed type instead of struct directly. 2013-03-01 14:28:22 +09:00
Masaki Muranaka cb7cf4e795 Simplify mrb_range_beg_len(). Don't use OTHER macro. 2013-02-26 15:43:19 +09:00
Yukihiro "Matz" Matsumoto e18a9c0a56 Merge pull request #788 from masamitsu-murase/modify_range_initialize
Modify range initialize to prevent segmentation fault.
2013-01-29 05:35:15 -08:00
Masaki Muranaka ea82eaaa79 Remove unused function parametes. 2013-01-29 17:45:54 +09:00
Masamitsu MURASE 21ebb7f2c8 Initialize Range->edges after cheking beg and end to prevent segmentation fault. 2013-01-28 16:07:47 +09:00
Masamitsu MURASE 4bf76a67f1 Modify Range#initialize to accept optional exclusive argument. 2013-01-13 22:04:53 +09:00
Masamitsu MURASE f9b836a677 Initialize edges of RRange. 2013-01-13 22:04:45 +09:00
Tomoyuki Sahara b1f5840aef fix the issue String#slice with Range may return broken String. 2012-11-13 16:50:41 +09:00
Masaki Muranaka 6069a33089 mrb_raisef(): new function. Same as previou version of mrb_raise().
mrb_raise(): API modified. It cannot treat variable arguments.
2012-10-23 09:42:22 +09:00
Masaki Muranaka 93b56e70ee Avoid memcpy() on copying structure. 2012-10-15 13:56:45 +09:00
Yukihiro Matsumoto 7d02df3016 NaN boxing 2012-08-14 13:16:34 +09:00
Max Anselm 5a4beeed2d Make all(?) void casts explicit for C++ 2012-07-29 19:48:48 -04:00
Masaki Muranaka b2fc62f3a9 Remove commented out code. 2012-07-29 15:25:14 +09:00
Yukihiro Matsumoto 0ac2d7ac97 remove debug print 2012-07-17 23:38:43 +09:00
Masaki Muranaka 0339317bd6 Supress using switches with fallthru or a empty default label. 2012-07-16 13:36:36 +09:00
Junji Sawada 96366117ea Remove unnecessary header inclusion 2012-07-14 11:39:25 +09:00
Yukihiro Matsumoto bbec03bb7a add missing (empty) default for swtch; close #364 2012-07-13 14:35:18 +09:00
Yukihiro Matsumoto 48c73ac630 less <stdio.h> 2012-07-13 10:13:47 +09:00
Yukihiro Matsumoto 3b8ad4c30c small cosmetic change 2012-07-08 00:24:07 +09:00
Yukihiro Matsumoto 0d99856b57 proper type check when creating a range; #345 2012-07-08 00:20:56 +09:00
Masaki Muranaka e896c1cee3 Range optimization. similar to #348 2012-07-07 09:23:00 +09:00
Yukihiro Matsumoto 84ec555ecd range optimization from @monaka; close #348 2012-07-06 19:50:44 +09:00
Masaki Muranaka 21f2e5364b Use mrb_str_new() instead of mrb_str_new2() as possible. 2012-06-22 17:02:08 +09:00
Yukihiro Matsumoto e7034b57ff range.c: typo fixed 2012-06-19 16:47:17 +09:00
Yukihiro Matsumoto 4aad9e88d6 remove unused mrb_rescue() 2012-06-19 15:40:54 +09:00
Masaki Muranaka f564ec7e82 Remove some redundant code. 2012-06-15 00:56:00 +09:00
Masaki Muranaka b43e790b71 Remove unused functions. 2012-06-14 18:03:20 +09:00
Yukihiro Matsumoto 80c8908c4e remove mrb_exec_recursive 2012-06-03 17:59:59 +09:00
Yukihiro Matsumoto ad9e841c53 made mrb_get_args() better (optinal args, type checks); close #173 #176 2012-05-24 01:09:36 +09:00
Yukihiro Matsumoto 4523bee953 cast style consistency 2012-05-23 03:31:55 +09:00
Mitchell Blank Jr 9e336b00e5 More C++ compilability work: mrb_obj_alloc void* conversions
One of the biggest set of changes needed to make C++ compile, is that you
can't autoconvert "void*" to a different pointer type without a cast (you
can of course, convert pointers *to* "void*"!)

For the first part, convert the users of "mrb_obj_alloc".  Since it has
to return something, make it RBasic* (that's what mrb_obj_alloc() is
operating on anyway).  This way, even in C you'll get a warning if you
don't cast it.

For places where there are a lot of similar calls to mrb_obj_alloc(),
this can be easily hidden through a macro.  I did this in string.c:
    #define mrb_obj_alloc_string(mrb) ((struct RString *) mrb_obj_alloc((mrb), MRB_TT_STRING, (mrb)->string_class))

I also updated the mrb_object() macro to also return a RBasic* -- my
previous commit changed that from "void*" -> "RObject*", but I figure
it should be consistent with mrb_obj_alloc()
2012-05-20 09:43:14 -07:00
Masaki Muranaka c6f0e296bd Remove some redundant function declarations. 2012-05-16 14:31:48 +09:00
Yukihiro Matsumoto 4d3ed8c4f9 remove mrb->range_class 2012-05-10 23:07:54 +09:00