File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ 2008-01-28 Masahiro TANAKA <masa16.tanaka at gmail.com>
2+
3+ * na_array.c (na_range_to_sequence, na_do_mdai):
4+ * na_index.c (na_index_range):
5+ change in internal structure of Ruby 1.9 Range object.
6+ Thanks to Hargobind Khalsa.
7+
8+ * ver 0.5.9p4
9+
1102007-12-27 Masahiro TANAKA <masa16.tanaka at gmail.com>
211
312 * narray_local.h, narray.c, na_array.c:
413 use RSTRING_PTR, RSTRING_LEN for Ruby 1.9.0.
514
15+ * ver 0.5.9p3
16+
6172007-12-11 Masahiro TANAKA <masah16.tanaka at gmail.com>
718
819 * mkop.rb:
Original file line number Diff line number Diff line change @@ -122,8 +122,8 @@ static void
122122{
123123 int end ,len ;
124124
125- * beg = NUM2INT (rb_ivar_get (obj , na_id_beg ));
126- end = NUM2INT (rb_ivar_get (obj , na_id_end ));
125+ * beg = NUM2INT (rb_funcall (obj , na_id_beg , 0 ));
126+ end = NUM2INT (rb_funcall (obj , na_id_end , 0 ));
127127 len = end - * beg ;
128128
129129 /* direction */
@@ -179,8 +179,8 @@ static int
179179 if ( rb_obj_is_kind_of (v , rb_cRange ) ) {
180180 na_range_to_sequence (v ,& length ,& start ,& dir );
181181 len += length - 1 ;
182- mdai -> type [ na_object_type (rb_ivar_get (v , na_id_beg )) ] = 1 ;
183- mdai -> type [ na_object_type (rb_ivar_get (v , na_id_end )) ] = 1 ;
182+ mdai -> type [ na_object_type (rb_funcall (v , na_id_beg , 0 )) ] = 1 ;
183+ mdai -> type [ na_object_type (rb_funcall (v , na_id_end , 0 )) ] = 1 ;
184184 }
185185 else {
186186
Original file line number Diff line number Diff line change @@ -23,15 +23,15 @@ static int
2323 sl -> idx = NULL ;
2424
2525 /* Beginning */
26- vbeg = rb_ivar_get (obj , na_id_beg );
26+ vbeg = rb_funcall (obj , na_id_beg , 0 );
2727 if (vbeg == Qnil ) /* First is nil */
2828 beg = 0 ;
2929 else
3030 beg = NUM2INT (vbeg );
3131 if (beg < 0 ) beg += size ;
3232
3333 /* End */
34- vend = rb_ivar_get (obj , na_id_end );
34+ vend = rb_funcall (obj , na_id_end , 0 );
3535 if (vend == Qnil ) { /* Last is nil */
3636 sl -> beg = beg ;
3737 sl -> step = 1 ;
Original file line number Diff line number Diff line change 1919# include <sys/types.h>
2020#endif
2121
22- #define NARRAY_VERSION "0.5.9p3 "
23- #define NARRAY_VERSION_CODE 593
22+ #define NARRAY_VERSION "0.5.9p4 "
23+ #define NARRAY_VERSION_CODE 594
2424
2525/*
2626 Data types used in NArray :
You can’t perform that action at this time.
0 commit comments