Changeset bb2fb6 in git


Ignore:
Timestamp:
Oct 20, 2014, 1:04:13 AM (10 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
1965800c56ab5ae85bbaa4c89cbae5719bd81515
Parents:
e44b6585772fa41d9893199725238698a09c0ee2
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-10-20 01:04:13+02:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-10-22 13:55:04+02:00
Message:
Minor fixes
Location:
Singular
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/attrib.cc

    re44b658 rbb2fb6  
    4141attr sattr::Copy()
    4242{
    43   if (this!=NULL)
    44   {
    45     omCheckAddrSize(this,sizeof(sattr));
    46     attr n=(attr)omAlloc0Bin(sattr_bin);
    47     n->atyp=atyp;
    48     if (name!=NULL) n->name=omStrDup(name);
    49     n->data=CopyA();
    50     if (next!=NULL)
    51     {
    52       n->next=next->Copy();
    53     }
    54     return n;
    55   }
    56   else
    57     return NULL;
     43  assume (this!=NULL);
     44
     45  omCheckAddrSize(this,sizeof(sattr));
     46  attr n=(attr)omAlloc0Bin(sattr_bin);
     47  n->atyp=atyp;
     48  if (name!=NULL) n->name=omStrDup(name);
     49  n->data=CopyA();
     50  if (next!=NULL)
     51  {
     52    n->next=next->Copy();
     53  } 
     54  return n;
    5855}
    5956
  • Singular/dyn_modules/syzextra/mod_main.cc

    re44b658 rbb2fb6  
    11881188
    11891189  _res->length = length + 1; // index + 1;
    1190   _res->fullres = (resolvente)omAlloc0((_res->length)*sizeof(ideal));
     1190  _res->fullres = (resolvente)omAlloc0((_res->length+1)*sizeof(ideal));
    11911191  int index = 0;
    11921192  _res->fullres[index++] = M;
  • Singular/lists.h

    re44b658 rbb2fb6  
    2525    void Clean(ring r=currRing)
    2626    {
    27       if (this!=NULL)
     27      assume (this!=NULL);
     28     
     29      if (nr>=0)
    2830      {
    29         if (nr>=0)
     31        int i;
     32        for(i=nr;i>=0;i--)
    3033        {
    31           int i;
    32           for(i=nr;i>=0;i--)
    33           {
    34             if (m[i].rtyp!=DEF_CMD) m[i].CleanUp(r);
    35           }
    36           omFreeSize((ADDRESS)m, (nr+1)*sizeof(sleftv));
    37           nr=-1;
     34          if (m[i].rtyp!=DEF_CMD) m[i].CleanUp(r);
    3835        }
    39         //omFreeSize((ADDRESS)this, sizeof(slists));
    40         omFreeBin((ADDRESS)this,slists_bin);
     36        omFreeSize((ADDRESS)m, (nr+1)*sizeof(sleftv));
     37        nr=-1;
    4138      }
     39      //omFreeSize((ADDRESS)this, sizeof(slists));
     40      omFreeBin((ADDRESS)this,slists_bin);
    4241    }
    43   INLINE_THIS void Init(int l=0);
     42    INLINE_THIS void Init(int l=0);
    4443    int    nr; /* the number of elements in the list -1 */
    4544               /* -1: empty list */
Note: See TracChangeset for help on using the changeset viewer.