initialize_copy(p1)
private
Show source
static VALUE
strscan_init_copy(VALUE vself, VALUE vorig)
{
struct strscanner *self, *orig;
Data_Get_Struct(vself, struct strscanner, self);
check_strscan(vorig);
Data_Get_Struct(vorig, struct strscanner, orig);
if (self != orig) {
self->flags = orig->flags;
self->str = orig->str;
self->prev = orig->prev;
self->curr = orig->curr;
onig_region_copy(&self->regs, &orig->regs);
}
return vself;
}