Changeset 76a7291 in git


Ignore:
Timestamp:
Nov 2, 2016, 10:06:31 AM (7 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
3b2f18b809aae88b52d4b3a2008335a979a47b49
Parents:
1f2e178524399d9770203927b4de7a3c47929f32
Message:
fix: move CleanUp of args to the innermost iiExprArith*

this fixes tr. #780 and tr. #781
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r1f2e178 r76a7291  
    79607960          break;// leave loop, goto error handling
    79617961        }
     7962        a->CleanUp();
     7963        b->CleanUp();
    79627964        //Print("op: %d,result typ:%d\n",op,res->rtyp);
    79637965        return FALSE;
     
    80758077      }
    80768078    }
     8079    a->CleanUp();
     8080    b->CleanUp();
    80778081    res->rtyp = UNKNOWN;
    80788082  }
     
    80898093  BOOLEAN bo=iiExprArith2TabIntern(res,a,op,b,TRUE,dA2,at,bt,dConvertTypes);
    80908094  a->next=b;
    8091   a->CleanUp();
     8095  a->CleanUp(); // to clean up the chain, content already done in iiExprArith2TabIntern
    80928096  return bo;
    80938097}
     
    81048108      command d=(command)omAlloc0Bin(sip_command_bin);
    81058109      memcpy(&d->arg1,a,sizeof(sleftv));
    8106       //a->Init();
     8110      a->Init();
    81078111      memcpy(&d->arg2,b,sizeof(sleftv));
    8108       //b->Init();
     8112      b->Init();
    81098113      d->argc=2;
    81108114      d->op=op;
     
    82948298      command d=(command)omAlloc0Bin(sip_command_bin);
    82958299      memcpy(&d->arg1,a,sizeof(sleftv));
    8296       //a->Init();
     8300      a->Init();
    82978301      d->op=op;
    82988302      d->argc=1;
     
    83718375          break;// leave loop, goto error handling
    83728376        }
     8377        a->CleanUp();
     8378        b->CleanUp();
     8379        c->CleanUp();
    83738380        return FALSE;
    83748381      }
     
    84248431                  omFreeBin((ADDRESS)cn, sleftv_bin);
    84258432                  //Print("op: %d,result typ:%d\n",op,res->rtyp);
     8433                  a->CleanUp();
     8434                  b->CleanUp();
     8435                  c->CleanUp();
    84268436                  return FALSE;
    84278437                }
     
    84858495    res->rtyp = UNKNOWN;
    84868496  }
    8487         //Print("op: %d,result typ:%d\n",op,res->rtyp);
     8497  a->CleanUp();
     8498  b->CleanUp();
     8499  c->CleanUp();
     8500  //Print("op: %d,result typ:%d\n",op,res->rtyp);
    84888501  return TRUE;
    84898502}
     
    85008513      command d=(command)omAlloc0Bin(sip_command_bin);
    85018514      memcpy(&d->arg1,a,sizeof(sleftv));
    8502       //a->Init();
     8515      a->Init();
    85038516      memcpy(&d->arg2,b,sizeof(sleftv));
    8504       //b->Init();
     8517      b->Init();
    85058518      memcpy(&d->arg3,c,sizeof(sleftv));
    8506       //c->Init();
     8519      c->Init();
    85078520      d->op=op;
    85088521      d->argc=3;
     
    85378550  b->CleanUp();
    85388551  c->CleanUp();
    8539         //Print("op: %d,result typ:%d\n",op,res->rtyp);
     8552  //Print("op: %d,result typ:%d\n",op,res->rtyp);
    85408553  return TRUE;
    85418554}
     
    85548567  b->next=c;
    85558568  a->next=b;
    8556   a->CleanUp();
     8569  a->CleanUp(); // to cleanup the chain, content already done
    85578570  return bo;
    85588571}
     
    91509163        tmp.Copy(v);
    91519164        bo=iiExprArith2TabIntern(&res_l->m[i],&c->m[i],CHINREM_CMD,&tmp,TRUE,dArith2+tab_pos,c->m[i].rtyp,tmp.rtyp,dConvertTypes);
    9152         tmp.CleanUp();
    91539165        if (bo) { Werror("chinrem failed for list entry %d",i+1); break;}
    91549166      }
     
    93049316    tmp.Copy(v);
    93059317    bo=iiExprArith2TabIntern(&res_l->m[i],&c->m[i],FAREY_CMD,&tmp,TRUE,dArith2+tab_pos,c->m[i].rtyp,tmp.rtyp,dConvertTypes);
    9306     tmp.CleanUp();
    93079318    if (bo) { Werror("farey failed for list entry %d",i+1); break;}
    93089319  }
Note: See TracChangeset for help on using the changeset viewer.