Changeset bf7dfc in git


Ignore:
Timestamp:
Dec 7, 2012, 4:33:00 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
98bf9ba410cd86cf36196a85fad65238d81947e9
Parents:
ec1006cbd9971c4271d05aefada775ef29d762a6
Message:
fix: newstruct-cleanup without a ring (from master)
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/newstruct.cc

    rec1006 rbf7dfc  
    202202}
    203203
     204void lClean_newstruct(lists l)
     205{
     206  if (l->nr>=0)
     207  {
     208    int i;
     209    ring r=NULL;
     210    for(i=l->nr;i>=0;i--)
     211    {
     212      if ((i>0) && (l->m[i-1].rtyp==RING_CMD))
     213        r=(ring)(l->m[i-1].data);
     214      else
     215        r=NULL;
     216      l->m[i].CleanUp(r);
     217    }
     218    omFreeSize((ADDRESS)l->m, (l->nr+1)*sizeof(sleftv));
     219    l->nr=-1;
     220  }
     221  omFreeBin((ADDRESS)l,slists_bin);
     222}
     223
    204224BOOLEAN newstruct_Assign(leftv l, leftv r)
    205225{
     
    243263      {
    244264        lists n1=(lists)l->Data();
    245         n1->Clean(); n1=NULL;
     265        lClean_newstruct(n1);
    246266      }
    247267      lists n2=(lists)r->Data();
     
    477497}
    478498
    479 void lClean_newstruct(lists l)
    480 {
    481   if (l->nr>=0)
    482   {
    483     int i;
    484     ring r=NULL;
    485     for(i=l->nr;i>=0;i--)
    486     {
    487       if ((i>0) && (l->m[i-1].rtyp==RING_CMD))
    488         r=(ring)(l->m[i-1].data);
    489       else
    490         r=NULL;
    491       l->m[i].CleanUp(r);
    492     }
    493     omFreeSize((ADDRESS)l->m, (l->nr+1)*sizeof(sleftv));
    494     l->nr=-1;
    495   }
    496   omFreeBin((ADDRESS)l,slists_bin);
    497 }
    498 
    499499void newstruct_destroy(blackbox *b, void *d)
    500500{
  • libpolys/polys/simpleideals.cc

    rec1006 rbf7dfc  
    1818// #include <coeffs/longrat.h>
    1919#include "matpol.h"
    20  
     20
    2121#include "monomials/p_polys.h"
    2222#include "weight.h"
     
    121121    do
    122122    {
    123       p_Delete(&((*h)->m[--j]), r);
     123      j--;
     124      poly pp=((*h)->m[j]);
     125      if (pp!=NULL) p_Delete(&pp, r);
    124126    }
    125127    while (j>0);
     
    262264#else
    263265          if (p_ComparePolys(id->m[i], id->m[j],r)) p_Delete(&id->m[j],r);
    264 #endif   
     266#endif
    265267        }
    266268      }
     
    364366#ifdef HAVE_RINGS
    365367          }
    366 #endif   
     368#endif
    367369        }
    368370      }
Note: See TracChangeset for help on using the changeset viewer.