Changeset 0c1144 in git


Ignore:
Timestamp:
Apr 19, 1999, 3:04:58 PM (24 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
Children:
2dbaecee7fbb95a8b2a5fa9e09e9df7face209f7
Parents:
228c7e51151a4fc3bdf6908acbb09367f243d275
Message:
*hannes: fixed list-assignment-bug


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

Legend:

Unmodified
Added
Removed
  • Singular/ipassign.cc

    r228c7e r0c1144  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipassign.cc,v 1.47 1999-03-16 10:34:21 hannes Exp $ */
     4/* $Id: ipassign.cc,v 1.48 1999-04-19 13:04:56 Singular Exp $ */
    55
    66/*
     
    836836  int sl = r->listLength();
    837837  lists L=(lists)Alloc(sizeof(slists));
     838  lists oldL;
    838839  leftv h=NULL,o_r=r;
    839840  int i;
     
    873874      }
    874875  }
    875   IDLIST((idhdl)l->data)->Clean();
    876   IDLIST((idhdl)l->data)=L;
     876  oldL=(lists)l->Data(); oldL->Clean();
     877  if (l->rtyp==IDHDL)
     878  {
     879    IDLIST((idhdl)l->data)=L;
    877880#ifdef HAVE_NAMESPACES
    878   if (l->req_packhdl != NULL)
    879   {
    880     //Print("jjA_L_LIST: -1 \n");
    881     namespaceroot->push( IDPACKAGE(l->req_packhdl), IDID((idhdl)l));
    882     ipMoveId((idhdl)l->data);
    883     namespaceroot->pop();
     881    if (l->req_packhdl != NULL)
     882    {
     883      //Print("jjA_L_LIST: -1 \n");
     884      namespaceroot->push( IDPACKAGE(l->req_packhdl), IDID((idhdl)l));
     885      ipMoveId((idhdl)l->data);
     886      namespaceroot->pop();
     887    }
     888    else
     889#endif /* HAVE_NAMESPACES */
     890      ipMoveId((idhdl)l->data);
    884891  }
    885892  else
    886 #endif /* HAVE_NAMESPACES */
    887     ipMoveId((idhdl)l->data);
     893  {
     894    l->LData()->data=L;
     895  }
    888896err:
    889897  o_r->CleanUp();
     
    14181426        else
    14191427        {
    1420           matrix rm;
     1428          matrix rm;
    14211429          ht=hh->Typ();
    14221430          if ((j=iiTestConvert(ht,etyp))!=0)
  • Singular/lists.cc

    r228c7e r0c1144  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: lists.cc,v 1.15 1999-04-19 11:02:40 obachman Exp $ */
     4/* $Id: lists.cc,v 1.16 1999-04-19 13:04:58 Singular Exp $ */
    55/*
    66* ABSTRACT: handling of the list type
     
    8888  for(j=ul->nr+1;j<pos;j++)
    8989    l->m[j].rtyp=DEF_CMD;
    90   memset(&(l->m[pos]),0,sizeof(sleftv));
     90  // memset(&(l->m[pos]),0,sizeof(sleftv)); - done by Init
    9191  l->m[pos].rtyp=v->Typ();
    9292  l->m[pos].data=v->CopyD();
     
    356356char* lString(lists l, BOOLEAN typed, int dim)
    357357{
    358   if (l->nr == -1) 
     358  if (l->nr == -1)
    359359  {
    360360    if (typed) return mstrdup("list()");
    361361    return mstrdup("");
    362362  }
    363  
     363
    364364  char** slist = (char**) Alloc((l->nr+1) * sizeof(char*));
    365365  int i, j, k;
Note: See TracChangeset for help on using the changeset viewer.