Sha256: 3decbba96506707d27087dcbdfc9dd5803d50b56b51cb638c507dee6229e2941

Contents?: true

Size: 958 Bytes

Versions: 12

Compression:

Stored size: 958 Bytes

Contents

o:$YARD::CodeObjects::MethodObject:
@name:initialize:@docstringIC:YARD::Docstring"
:@objectu:YARD::StubProxyStruct#initialize:
@summary0:	@all":@ref_tags[:
@tags[:@current_file_has_commentsF:@scope:
instance:@parameters[:@docstring_extra0:@files[["
struct.c0:@namespaceu;Struct:
@path"Struct#initialize;[:@visibility:public:@source"?/*
 */

static VALUE
rb_struct_initialize(self, values)
    VALUE self, values;
{
    VALUE klass = rb_obj_class(self);
    VALUE size;
    long n;

    rb_struct_modify(self);
    size = rb_struct_iv_get(klass, "__size__");
    n = FIX2LONG(size);
    if (n < RARRAY(values)->len) {
    rb_raise(rb_eArgError, "struct size differs");
    }
    MEMCPY(RSTRUCT(self)->ptr, RARRAY(values)->ptr, VALUE, RARRAY(values)->len);
    if (n > RARRAY(values)->len) {
    rb_mem_clear(RSTRUCT(self)->ptr+RARRAY(values)->len,
             n-RARRAY(values)->len);
    }
    return Qnil;
}:@source_type:c

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
pry-doc-0.4.4 lib/pry-doc/core_docs_18/objects/Struct/initialize_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_18/objects/Struct/initialize_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_18/objects/Struct/initialize_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_18/objects/Struct/initialize_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_18/objects/Struct/initialize_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_18/objects/Struct/initialize_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_18/objects/Struct/initialize_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_18/objects/Struct/initialize_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_18/objects/Struct/initialize_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_18/objects/Struct/initialize_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_18/objects/Struct/initialize_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_18/objects/Struct/initialize_i.dat