another place for arr_bptr

This commit is contained in:
dzaima 2021-09-09 19:22:36 +03:00
parent 32e476b0c2
commit 818675e4c0

View File

@ -204,19 +204,16 @@ static void mut_copyG(Mut* m, usz ms, B x, usz xs, usz l) { assert(isArr(x));
} }
case el_B: { case el_B: {
B* mpo = m->aB+ms; B* mpo = m->aB+ms;
B* xp; B* xp = arr_bptr(x);
if (xt==t_harr) xp = harr_ptr(x); if (xp!=NULL) {
else if (xt==t_hslice) xp = c(HSlice,x)->a;
else if (xt==t_fillarr) xp = c(FillArr,x)->a;
else {
BS2B xget = TIi(xt,get);
for (usz i = 0; i < l; i++) mpo[i] = xget(x,i+xs);
return;
}
memcpy(mpo, xp+xs, l*sizeof(B*)); memcpy(mpo, xp+xs, l*sizeof(B*));
for (usz i = 0; i < l; i++) inc(mpo[i]); for (usz i = 0; i < l; i++) inc(mpo[i]);
return; return;
} }
BS2B xget = TIi(xt,get);
for (usz i = 0; i < l; i++) mpo[i] = xget(x,i+xs);
return;
}
} }
} }