Method: File::Stat#initialize_copy

Defined in:
file.c

#initialize_copy(orig) ⇒ Object

:nodoc:



5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
# File 'file.c', line 5710

static VALUE
rb_stat_init_copy(VALUE copy, VALUE orig)
{
    if (!OBJ_INIT_COPY(copy, orig)) return copy;

    struct rb_stat *orig_rb_st;
    TypedData_Get_Struct(orig, struct rb_stat, &stat_data_type, orig_rb_st);

    struct rb_stat *copy_rb_st;
    TypedData_Get_Struct(copy, struct rb_stat, &stat_data_type, copy_rb_st);

    *copy_rb_st = *orig_rb_st;
    return copy;
}