Changeset b67caf4 in git for Singular/ipshell.cc
- Timestamp:
- Jan 23, 2015, 6:37:31 PM (9 years ago)
- Branches:
- (u'spielwiese', '873fc1222e995d7cb33f79d8f1792ce418c8c72c')
- Children:
- 97a7da2750245efc953ff12aad2e56a4bff4374e
- Parents:
- 51d7406c03edf243bdd427e9698f4c38805e0743
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ipshell.cc
r51d7406 rb67caf4 5868 5868 { 5869 5869 intvec *aa=(intvec*)a->Data(); 5870 intvec *r=ivCopy(aa);5871 5870 sleftv tmp_out; 5872 5871 sleftv tmp_in; 5872 leftv curr=res; 5873 5873 BOOLEAN bo=FALSE; 5874 5874 for(int i=0;i<aa->length(); i++) … … 5881 5881 else 5882 5882 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); 5886 5886 Werror("apply fails at index %d",i+1); 5887 5887 return TRUE; 5888 5888 } 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 } 5892 5897 return FALSE; 5893 5898 } … … 5905 5910 { 5906 5911 lists aa=(lists)a->Data(); 5907 lists r=(lists)omAlloc0Bin(slists_bin); r->Init(aa->nr+1);5908 5912 sleftv tmp_out; 5909 5913 sleftv tmp_in; 5914 leftv curr=res; 5910 5915 BOOLEAN bo=FALSE; 5911 5916 for(int i=0;i<=aa->nr; i++) … … 5920 5925 if (bo) 5921 5926 { 5922 if (r!=NULL) r->Clean();5927 res->CleanUp(currRing); 5923 5928 Werror("apply fails at index %d",i+1); 5924 5929 return TRUE; 5925 5930 } 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 } 5929 5939 return FALSE; 5930 5940 }
Note: See TracChangeset
for help on using the changeset viewer.