Beispiel #1
0
void
mrb_iv_copy(mrb_state *mrb, mrb_value dest, mrb_value src)
{
    struct RObject *d = mrb_obj_ptr(dest);
    struct RObject *s = mrb_obj_ptr(src);

    if (d->iv) {
        iv_free(mrb, d->iv);
        d->iv = 0;
    }
    if (s->iv) {
        d->iv = iv_copy(mrb, s->iv);
    }
}
Beispiel #2
0
MRB_API void
mrb_iv_copy(mrb_state *mrb, mrb_value dest, mrb_value src)
{
  struct RObject *d = mrb_obj_ptr(dest);
  struct RObject *s = mrb_obj_ptr(src);

  if (d->iv) {
    iv_free(mrb, d->iv);
    d->iv = 0;
  }
  if (s->iv) {
    mrb_write_barrier(mrb, (struct RBasic*)d);
    d->iv = iv_copy(mrb, s->iv);
  }
}
Beispiel #3
0
 void set_intVecp(const IVECP value) {
   iv_copy(value, _intVecp);
 }