more shcpy
This commit is contained in:
parent
3455bed3ee
commit
cb1338951c
@ -19,7 +19,7 @@ B select_c1(B t, B x) {
|
|||||||
usz ia = shProd(a(x)->sh, 1, xr);
|
usz ia = shProd(a(x)->sh, 1, xr);
|
||||||
Arr* r = TI(x,slice)(inc(x), 0, ia);
|
Arr* r = TI(x,slice)(inc(x), 0, ia);
|
||||||
usz* sh = arr_shAlloc(r, xr-1);
|
usz* sh = arr_shAlloc(r, xr-1);
|
||||||
if (sh) for (i32 i = 1; i < xr; i++) sh[i-1] = a(x)->sh[i];
|
if (sh) shcpy(sh, a(x)->sh+1, xr-1);
|
||||||
decG(x);
|
decG(x);
|
||||||
return taga(r);
|
return taga(r);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -716,7 +716,7 @@ B take_c2(B t, B w, B x) {
|
|||||||
} else {
|
} else {
|
||||||
usz* rsh = arr_shAlloc(a, xr); // xr>1, don't have to worry about 0
|
usz* rsh = arr_shAlloc(a, xr); // xr>1, don't have to worry about 0
|
||||||
rsh[0] = wv<0?-wv:wv;
|
rsh[0] = wv<0?-wv:wv;
|
||||||
for (i32 i = 1; i < xr; i++) rsh[i] = xsh[i];
|
shcpy(rsh+1, xsh+1, xr-1);
|
||||||
ptr_dec(shObjS(xsh));
|
ptr_dec(shObjS(xsh));
|
||||||
}
|
}
|
||||||
return taga(a);
|
return taga(a);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user