Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Using RARRAY_LEN and RARRAY_PTR for Ruby 1.9 compatibility

  • Loading branch information...
commit 3d259b5e81a869d596d149230016b1f350ab3cfe 1 parent e5f05ae
@santana authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 ext/informixc.ec
View
8 ext/informixc.ec
@@ -32,7 +32,7 @@
#include <sqlstype.h>
#include <sqltypes.h>
-static VALUE rb_cDate, rb_cBigDecimal, rb_cRational;
+static VALUE rb_cDate, rb_cBigDecimal;
/* Modules */
static VALUE rb_mInformix;
@@ -1909,8 +1909,8 @@ make_result(cursor_t *c, VALUE record)
if (BUILTIN_TYPE(record) == T_ARRAY) {
rb_ary_store(record, i, item);
}
- else {
- rb_hash_aset(record, RARRAY(c->field_names)->ptr[i], item);
+ else {
+ rb_hash_aset(record, RARRAY_PTR(c->field_names)[i], item);
}
}
return record;
@@ -2720,7 +2720,7 @@ each_by(VALUE self, VALUE n, VALUE type)
for(;;) {
records = fetch_many(self, n, type);
- if (RARRAY(records)->len == 0)
+ if (RARRAY_LEN(records) == 0)
return self;
rb_yield(records);
}
Please sign in to comment.
Something went wrong with that request. Please try again.