@@ -43,7 +43,7 @@ eltype2class(int eltype, VALUE* ret) {
4343 break ;
4444 case CV_SEQ_ELTYPE_CODE:
4545 case CV_SEQ_ELTYPE_INDEX:
46- *ret = rb_cFixnum ;
46+ *ret = rb_cInteger ;
4747 break ;
4848 case CV_SEQ_ELTYPE_PPOINT: // or CV_SEQ_ELTYPE_PTR:
4949 // Not supported
@@ -132,7 +132,7 @@ class2seq_flags_value(VALUE klass) {
132132 else if (klass == cCvPoint3D32f::rb_class ()) {
133133 seq_flags = CV_SEQ_ELTYPE_POINT3D;
134134 }
135- else if (klass == rb_cFixnum ) {
135+ else if (klass == rb_cInteger ) {
136136 seq_flags = CV_SEQ_ELTYPE_INDEX;
137137 }
138138 else {
@@ -146,14 +146,14 @@ class2seq_flags_value(VALUE klass) {
146146 * Constructor
147147 *
148148 * @overload new(seq_flags, storage = nil)
149- * @param [Fixnum ] seq_flags Flags of the created sequence, which are combinations of
149+ * @param [Integer ] seq_flags Flags of the created sequence, which are combinations of
150150 * the element types and sequence types.
151151 * - Element type:
152152 * - <tt>CV_SEQ_ELTYPE_POINT</tt>: {CvPoint}
153153 * - <tt>CV_32FC2</tt>: {CvPoint2D32f}
154154 * - <tt>CV_SEQ_ELTYPE_POINT3D</tt>: {CvPoint3D32f}
155- * - <tt>CV_SEQ_ELTYPE_INDEX</tt>: Fixnum
156- * - <tt>CV_SEQ_ELTYPE_CODE</tt>: Fixnum (Freeman code)
155+ * - <tt>CV_SEQ_ELTYPE_INDEX</tt>: Integer
156+ * - <tt>CV_SEQ_ELTYPE_CODE</tt>: Integer (Freeman code)
157157 * - Sequence type:
158158 * - <tt>CV_SEQ_KIND_GENERIC</tt>: Generic sequence
159159 * - <tt>CV_SEQ_KIND_CURVE</tt>: Curve
@@ -421,7 +421,7 @@ rb_pop(VALUE self)
421421 VALUE object = Qnil;
422422 VALUE klass = seqblock_class (seq);
423423 try {
424- if (klass == rb_cFixnum ) {
424+ if (klass == rb_cInteger ) {
425425 int n = 0 ;
426426 cvSeqPop (seq, &n);
427427 object = INT2FIX (n);
@@ -489,7 +489,7 @@ rb_shift(VALUE self)
489489
490490 VALUE object = Qnil;
491491 try {
492- if (seqblock_class (seq) == rb_cFixnum ) {
492+ if (seqblock_class (seq) == rb_cInteger ) {
493493 int n = 0 ;
494494 cvSeqPopFront (seq, &n);
495495 object = INT2NUM (n);
@@ -525,7 +525,7 @@ rb_each(VALUE self)
525525 if (seq->total > 0 ) {
526526 VALUE klass = seqblock_class (seq);
527527 try {
528- if (klass == rb_cFixnum )
528+ if (klass == rb_cInteger )
529529 for (int i = 0 ; i < seq->total ; ++i)
530530 rb_yield (INT2NUM (*CV_GET_SEQ_ELEM (int , seq, i)));
531531 else
@@ -567,10 +567,10 @@ rb_insert(VALUE self, VALUE index, VALUE object)
567567 Check_Type (index, T_FIXNUM);
568568 CvSeq *seq = CVSEQ (self);
569569 VALUE klass = seqblock_class (seq);
570- if (CLASS_OF (object) != klass)
570+ if (! rb_obj_is_kind_of (object, klass) )
571571 rb_raise (rb_eTypeError, " arguments should be %s." , rb_class2name (klass));
572572 try {
573- if (klass == rb_cFixnum ) {
573+ if (klass == rb_cInteger ) {
574574 int n = NUM2INT (object);
575575 cvSeqInsert (seq, NUM2INT (index), &n);
576576 }
0 commit comments