Flowdock
initialize_copy(p1) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
static VALUE
rb_stat_init_copy(VALUE copy, VALUE orig)
{
    struct stat *nst;

    if (copy == orig) return orig;
    rb_check_frozen(copy);
    /* need better argument type check */
    if (!rb_obj_is_instance_of(orig, rb_obj_class(copy))) {
        rb_raise(rb_eTypeError, "wrong argument class");
    }
    if (DATA_PTR(copy)) {
        xfree(DATA_PTR(copy));
        DATA_PTR(copy) = 0;
    }
    if (DATA_PTR(orig)) {
        nst = ALLOC(struct stat);
        *nst = *(struct stat*)DATA_PTR(orig);
        DATA_PTR(copy) = nst;
    }

    return copy;
}
Register or log in to add new notes.