Class: Array
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#data_type ⇒ Object
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'ext/barracuda.c', line 111
static VALUE
array_data_type_get(VALUE self)
{
VALUE value = rb_ivar_get(self, id_data_type);
if (RTEST(value)) return value;
if (RARRAY_LEN(self) > 0) {
if (NIL_P(RARRAY_PTR(self)[0])) return ID2SYM(id_type_int);
VALUE value = rb_funcall(RARRAY_PTR(self)[0], id_data_type, 0);
if (RTEST(value)) return value;
}
rb_raise(rb_eTypeError, "unknown buffer data %s",
RSTRING_PTR(rb_inspect(self)));
}
|
#outvar ⇒ Object
396 397 398 399 400 401 402 403 404 |
# File 'ext/barracuda.c', line 396
static VALUE
array_to_outvar(VALUE self)
{
VALUE buf = rb_funcall(rb_cBuffer, id_new, 0);
rb_ary_replace(buf, self);
buffer_outvar(buf);
buffer_mark_dirty(buf);
return buf;
}
|