Changeset 81c5cb in git


Ignore:
Timestamp:
Feb 6, 2012, 6:20:45 PM (12 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
9ec1669f774f9fd5bc45c6c9b8b224cff15ab286
Parents:
eb2d25597130bb1991b6b11239571930294ba1d7
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-06 18:20:45+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-06 19:38:19+01:00
Message:
temporary fix for local objects while setting minpoly

FIX: kill local objects (run debug version for details)

TODO: map local objects properly...
Location:
Singular
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/idrec.h

    reb2d25 r81c5cb  
    4949  idhdl get(const char * s, int lev);
    5050  idhdl set(const char * s, int lev, int t/*typ*/, BOOLEAN init=TRUE);
    51   char * String();
     51  char * String(BOOLEAN typed = FALSE);
    5252//  ~idrec();
    5353};
  • Singular/ipassign.cc

    reb2d25 r81c5cb  
    200200  if ( currRing->idroot != NULL )
    201201  {
    202     WerrorS("no minpoly allowed if there are local objects belonging to the basering");
    203     return TRUE;
    204   }
     202#ifndef NDEBUG     
     203//    return TRUE;
     204  idhdl p = currRing->idroot;
     205     
     206  WarnS("no minpoly allowed if there are local objects belonging to the basering: ");
     207  while(p != NULL)
     208  {
     209    Print(p->String(TRUE)); PrintLn();
     210    p = p->next;
     211  }   
     212#endif
     213  }
     214
     215  assume (currRing->idroot==NULL);
    205216 
    206217  number p = (number)a->CopyD(NUMBER_CMD);
     
    208219  if (n_IsZero(p, currRing->cf))
    209220  {
     221    n_Delete(&p, currRing);
    210222    WerrorS("cannot set minpoly to 0");
    211223    return TRUE;
    212224  }
    213225
    214   assume (currRing->idroot==NULL);
    215  
    216226  // remove all object currently in the ring
    217227  while(currRing->idroot!=NULL)
    218228  {
     229#ifndef NDEBUG
     230    Warn("killing a local object due to minpoly change: %s", IDID(currRing->idroot));
     231#endif
    219232    killhdl2(currRing->idroot,&(currRing->idroot),currRing);
    220233  }
  • Singular/ipid.cc

    reb2d25 r81c5cb  
    223223}
    224224
    225 char * idrec::String()
     225char * idrec::String(BOOLEAN typed)
    226226{
    227227  sleftv tmp;
     
    230230  tmp.data=IDDATA(this);
    231231  tmp.name=IDID(this);
    232   return tmp.String();
     232  return tmp.String(NULL, typed);
    233233}
    234234
Note: See TracChangeset for help on using the changeset viewer.