use TALLOC instead of m_shArr
This commit is contained in:
parent
36e78da56f
commit
a9b3b3de97
@ -958,7 +958,7 @@ B join_c1(B t, B x) {
|
|||||||
usz xia = a(x)->ia;
|
usz xia = a(x)->ia;
|
||||||
usz* xsh = a(x)->sh;
|
usz* xsh = a(x)->sh;
|
||||||
usz tlen = 4*xr+2*r0; for (usz a=0; a<xr; a++) tlen+=xsh[a];
|
usz tlen = 4*xr+2*r0; for (usz a=0; a<xr; a++) tlen+=xsh[a];
|
||||||
ShArr* sto = m_shArr(tlen); usz* st = sto->a; // Temp buffer
|
TALLOC(usz, st, tlen); // Temp buffer
|
||||||
st[xr-1]=1; for (ur a=xr; a-->1; ) st[a-1] = st[a]*xsh[a]; // Stride
|
st[xr-1]=1; for (ur a=xr; a-->1; ) st[a-1] = st[a]*xsh[a]; // Stride
|
||||||
usz* tsh0 = st+xr; usz* tsh = tsh0+xr+r0; // Test shapes
|
usz* tsh0 = st+xr; usz* tsh = tsh0+xr+r0; // Test shapes
|
||||||
// Length buffer i is lp+lp[i]
|
// Length buffer i is lp+lp[i]
|
||||||
@ -1079,7 +1079,7 @@ B join_c1(B t, B x) {
|
|||||||
usz* sh = arr_shAlloc(ra, xr+tr);
|
usz* sh = arr_shAlloc(ra, xr+tr);
|
||||||
shcpy(sh , st , xr);
|
shcpy(sh , st , xr);
|
||||||
shcpy(sh+xr, csh, tr);
|
shcpy(sh+xr, csh, tr);
|
||||||
decShObj(sto);
|
TFREE(st);
|
||||||
decG(x);
|
decG(x);
|
||||||
return SFNS_FILLS? qWithFill(taga(ra), rf) : taga(ra);
|
return SFNS_FILLS? qWithFill(taga(ra), rf) : taga(ra);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user