Changeset 1bb52a in git


Ignore:
Timestamp:
Feb 4, 2020, 4:34:41 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
2ff629b24aa32f422e13cf36cce6e31941cc61e3
Parents:
a621aa377143a95ae232c9954c821ae2d44cdc3c
Message:
add: iiSetReturn (return without copy)
Location:
Singular
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Singular/grammar.cc

    ra621aa r1bb52a  
    41874187#line 1599 "grammar.y"
    41884188    {
    4189             iiRETURNEXPR.Copy(&(yyvsp[(3) - (4)].lv));
     4189            iiSetReturn(&(yyvsp[(3) - (4)].lv));
    41904190            (yyvsp[(3) - (4)].lv).CleanUp();
    41914191            if (exitBuffer(BT_proc)) YYERROR;
  • Singular/grammar.y

    ra621aa r1bb52a  
    15981598        RETURN '(' exprlist ')'
    15991599          {
    1600             iiRETURNEXPR.Copy(&$3);
     1600            iiSetReturn(&$3);
    16011601            $3.CleanUp();
    16021602            if (exitBuffer(BT_proc)) YYERROR;
  • Singular/ipshell.cc

    ra621aa r1bb52a  
    66046604  return TRUE;
    66056605}
     6606
     6607void iiSetReturn(const leftv source)
     6608{
     6609  if ((source->next==NULL)&&(source->e==NULL))
     6610  {
     6611    if ((source->rtyp!=IDHDL)&&(source->rtyp!=ALIAS_CMD))
     6612    {
     6613      memcpy(&iiRETURNEXPR,source,sizeof(sleftv));
     6614      source->Init();
     6615      return;
     6616    }
     6617    if (source->rtyp==IDHDL)
     6618    {
     6619      if ((IDLEV((idhdl)source->data)==myynest)
     6620      &&(IDTYP((idhdl)source->data)!=RING_CMD))
     6621      {
     6622        memset(&iiRETURNEXPR,0,sizeof(sleftv));
     6623        iiRETURNEXPR.rtyp=IDTYP((idhdl)source->data);
     6624        iiRETURNEXPR.data=IDDATA((idhdl)source->data);
     6625        iiRETURNEXPR.flag=IDFLAG((idhdl)source->data);
     6626        iiRETURNEXPR.attribute=IDATTR((idhdl)source->data);
     6627        IDATTR((idhdl)source->data)=NULL;
     6628        IDDATA((idhdl)source->data)=NULL;
     6629        source->name=NULL;
     6630        source->attribute=NULL;
     6631        return;
     6632      }
     6633    }
     6634  }
     6635  iiRETURNEXPR.Copy(source);
     6636}
  • Singular/ipshell.h

    ra621aa r1bb52a  
    300300BOOLEAN rDecompose_CF(leftv res,const coeffs C);
    301301ring rCompose(const lists  L, const BOOLEAN check_comp=TRUE, const long bitmask=0x7fff, const int isLetterplace=FALSE);
     302
     303void iiSetReturn(const leftv h);
    302304#endif
    303305
Note: See TracChangeset for help on using the changeset viewer.