Changeset 2dbaba4 in git


Ignore:
Timestamp:
May 5, 2009, 11:54:38 AM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'c1c65551e4b3a0de0b13ddf30446f6e9569681b5')
Children:
def568e9169e67d58842356d8b9718f9a255b706
Parents:
7bd06876c68417663814d23718236d06ed4f91b3
Message:
*hannes: ring dep. attribs (trac 134)


git-svn-id: file:///usr/local/Singular/svn/trunk@11770 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Singular/attrib.cc

    r7bd068 r2dbaba4  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: attrib.cc,v 1.33 2009-03-18 16:35:54 Singular Exp $ */
     4/* $Id: attrib.cc,v 1.34 2009-05-05 09:54:38 Singular Exp $ */
    55
    66/*
     
    194194}
    195195
    196 void sattr::kill()
     196void sattr::kill(const ring r)
    197197{
    198198  omFree((ADDRESS)name);
     
    206206  case MODUL_CMD:
    207207  case MATRIX_CMD:
    208     idDelete((ideal *)&data);
     208    id_Delete((ideal *)&data,r);
    209209    break;
    210210  case POLY_CMD:
    211211  case VECTOR_CMD:
    212     pDelete((poly *)&data);
     212    p_Delete((poly *)&data,r);
    213213    break;
    214214  case INT_CMD:
     
    226226}
    227227
    228 void sattr::killAll()
     228void sattr::killAll(const ring r)
    229229{
    230230  attr temp = this,temp1;
     
    233233  {
    234234    temp1 = temp->next;
    235     temp->kill();
     235    temp->kill(r);
    236236    temp = temp1;
    237237  }
    238238}
    239239
    240 void atKill(idhdl root,const char * name)
     240void at_Kill(idhdl root,const char * name, const ring r)
    241241{
    242242  attr temp = root->attribute->get(name);
     
    254254      temp1->next = N;
    255255    }
    256     temp->kill();
    257   }
    258 }
    259 
    260 void atKillAll(idhdl root)
    261 {
    262   root->attribute->killAll();
     256    temp->kill(r);
     257  }
     258}
     259
     260void at_KillAll(idhdl root, const ring r)
     261{
     262  root->attribute->killAll(r);
    263263  root->attribute = NULL;
    264264}
  • Singular/attrib.h

    r7bd068 r2dbaba4  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: attrib.h,v 1.8 2008-03-19 17:44:29 Singular Exp $ */
     6/* $Id: attrib.h,v 1.9 2009-05-05 09:54:37 Singular Exp $ */
    77/*
    88* ABSTRACT: attributes to leftv and idhdl
     
    2828    attr set(const char * s, void * data, int t);
    2929    attr get(const char * s);
    30     void kill();
    31     void killAll();
     30    void kill(const ring r);
     31    void killAll(const ring r);
    3232};
    3333
     
    3838void atSet(idhdl root,const char * name,void * data,int typ);
    3939void atSet(leftv root,const char * name,void * data,int typ);
    40 void atKillAll(idhdl root);
    41 void atKill(idhdl root,const char * name);
     40void at_KillAll(idhdl root,const ring r);
     41#define atKillAll(H) at_KillAll(H,currRing)
     42void at_Kill(idhdl root,const char * name,const ring r);
     43#define atKill(H,A) at_Kill(H,A,currRing)
    4244
    4345BOOLEAN atATTRIB1(leftv res,leftv a);
  • Singular/ipid.cc

    r7bd068 r2dbaba4  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipid.cc,v 1.85 2009-05-04 15:06:15 Singular Exp $ */
     4/* $Id: ipid.cc,v 1.86 2009-05-05 09:54:38 Singular Exp $ */
    55
    66/*
     
    539539  if (h->attribute!=NULL)
    540540  {
    541     atKillAll(h);
     541    at_KillAll(h,r);
    542542    //h->attribute=NULL;
    543543  }
  • Singular/ipshell.cc

    r7bd068 r2dbaba4  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipshell.cc,v 1.204 2009-05-04 15:06:16 Singular Exp $ */
     4/* $Id: ipshell.cc,v 1.205 2009-05-05 09:54:37 Singular Exp $ */
    55/*
    66* ABSTRACT:
     
    50605060    if (traceit &TRACE_SHOW_RINGS) Print("kill ring %lx\n",(long)r);
    50615061#endif
    5062     if (r==currRing)
    5063     {
    5064       if (r->qideal!=NULL)
    5065       {
    5066         currQuotient=NULL;
    5067       }
    5068       if (ppNoether!=NULL) pDelete(&ppNoether);
    5069       if (sLastPrinted.RingDependend())
    5070       {
    5071         sLastPrinted.CleanUp();
    5072       }
    5073       if ((myynest>0) && (iiRETURNEXPR[myynest].RingDependend()))
    5074       {
    5075         WerrorS("return value depends on local ring variable (export missing ?)");
    5076         iiRETURNEXPR[myynest].CleanUp();
    5077       }
    5078       currRing=NULL;
    5079       currRingHdl=NULL;
    5080     }
    50815062    if (r->qideal!=NULL)
    50825063    {
     
    51175098    {
    51185099      killhdl2(r->idroot,&(r->idroot),r);
     5100    }
     5101    if (r==currRing)
     5102    {
     5103      // all dependend stuff is done, clean global vars:
     5104      if (r->qideal!=NULL)
     5105      {
     5106        currQuotient=NULL;
     5107      }
     5108      if (ppNoether!=NULL) pDelete(&ppNoether);
     5109      if (sLastPrinted.RingDependend())
     5110      {
     5111        sLastPrinted.CleanUp();
     5112      }
     5113      if ((myynest>0) && (iiRETURNEXPR[myynest].RingDependend()))
     5114      {
     5115        WerrorS("return value depends on local ring variable (export missing ?)");
     5116        iiRETURNEXPR[myynest].CleanUp();
     5117      }
     5118      currRing=NULL;
     5119      currRingHdl=NULL;
    51195120    }
    51205121
  • Singular/subexpr.cc

    r7bd068 r2dbaba4  
    55* ABSTRACT: handling of leftv
    66*/
    7 /* $Id: subexpr.cc,v 1.103 2009-02-20 18:39:21 Singular Exp $ */
     7/* $Id: subexpr.cc,v 1.104 2009-05-05 09:54:38 Singular Exp $ */
    88
    99#include <stdlib.h>
     
    406406        {
    407407          t=attribute->next;
    408           attribute->kill();
     408          attribute->kill(currRing);
    409409          attribute=t;
    410410        }
Note: See TracChangeset for help on using the changeset viewer.