Changeset b67caf4 in git


Ignore:
Timestamp:
Jan 23, 2015, 6:37:31 PM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
97a7da2750245efc953ff12aad2e56a4bff4374e
Parents:
51d7406c03edf243bdd427e9698f4c38805e0743
Message:
changed "apply": returns expr_list
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipshell.cc

    r51d7406 rb67caf4  
    58685868{
    58695869  intvec *aa=(intvec*)a->Data();
    5870   intvec *r=ivCopy(aa);
    58715870  sleftv tmp_out;
    58725871  sleftv tmp_in;
     5872  leftv curr=res;
    58735873  BOOLEAN bo=FALSE;
    58745874  for(int i=0;i<aa->length(); i++)
     
    58815881    else
    58825882      bo=jjPROC(&tmp_out,proc,&tmp_in);
    5883     if (bo || (tmp_out.rtyp!=INT_CMD))
    5884     {
    5885       if (r!=NULL) delete r;
     5883    if (bo)
     5884    {
     5885      res->CleanUp(currRing);
    58865886      Werror("apply fails at index %d",i+1);
    58875887      return TRUE;
    58885888    }
    5889     (*r)[i]=(int)(long)tmp_out.data;
    5890   }
    5891   res->data=(void*)r;
     5889    if (i==0) { memcpy(res,&tmp_out,sizeof(tmp_out)); }
     5890    else
     5891    {
     5892      curr->next=(leftv)omAllocBin(sleftv_bin);
     5893      curr=curr->next;
     5894      memcpy(curr,&tmp_out,sizeof(tmp_out));
     5895    }
     5896  }
    58925897  return FALSE;
    58935898}
     
    59055910{
    59065911  lists aa=(lists)a->Data();
    5907   lists r=(lists)omAlloc0Bin(slists_bin); r->Init(aa->nr+1);
    59085912  sleftv tmp_out;
    59095913  sleftv tmp_in;
     5914  leftv curr=res;
    59105915  BOOLEAN bo=FALSE;
    59115916  for(int i=0;i<=aa->nr; i++)
     
    59205925    if (bo)
    59215926    {
    5922       if (r!=NULL) r->Clean();
     5927      res->CleanUp(currRing);
    59235928      Werror("apply fails at index %d",i+1);
    59245929      return TRUE;
    59255930    }
    5926     memcpy(&(r->m[i]),&tmp_out,sizeof(sleftv));
    5927   }
    5928   res->data=(void*)r;
     5931    if (i==0) { memcpy(res,&tmp_out,sizeof(tmp_out)); }
     5932    else
     5933    {
     5934      curr->next=(leftv)omAllocBin(sleftv_bin);
     5935      curr=curr->next;
     5936      memcpy(curr,&tmp_out,sizeof(tmp_out));
     5937    }
     5938  }
    59295939  return FALSE;
    59305940}
Note: See TracChangeset for help on using the changeset viewer.