In Files

Parent

Methods

Array

Public Instance Methods

to_msgpack(out = '') → String click to toggle source

Serializes the Array into raw bytes. This calls to_msgpack method reflectively for internal elements.

static VALUE MessagePack_Array_to_msgpack(int argc, VALUE *argv, VALUE self)
{
        ARG_BUFFER(out, argc, argv);
        // FIXME check sizeof(long) > sizeof(unsigned int) && RARRAY_LEN(self) > UINT_MAX
        msgpack_pack_array(out, (unsigned int)RARRAY_LEN(self));
        VALUE* p = RARRAY_PTR(self);
        VALUE* const pend = p + RARRAY_LEN(self);
        for(;p != pend; ++p) {
                rb_funcall(*p, s_to_msgpack, 1, out);
        }
        return out;
}

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.