method
initialize_copy
v1_8_6_287 -
Show latest stable
- Class:
Time
initialize_copy(p1)public
No documentation available.
/* :nodoc: */
static VALUE
time_init_copy(copy, time)
VALUE copy, time;
{
struct time_object *tobj, *tcopy;
if (copy == time) return copy;
time_modify(copy);
if (TYPE(time) != T_DATA || RDATA(time)->dfree != time_free) {
rb_raise(rb_eTypeError, "wrong argument type");
}
GetTimeval(time, tobj);
GetTimeval(copy, tcopy);
MEMCPY(tcopy, tobj, struct time_object, 1);
return copy;
}