Changeset 7347df in git


Ignore:
Timestamp:
Feb 24, 2012, 6:37:31 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
e8086733d77deaf0656dc33bc685bcc08f6a96ab
Parents:
6fcb1b3c2393904d51eeb611bdae4812282eddfc
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2012-02-24 18:37:31+01:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2012-02-24 18:38:14+01:00
Message:
fix: better check for adding package to Top (enterid)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipid.cc

    r6fcb1b3 r7347df  
    238238  s=omStrDup(s);
    239239  idhdl *save_root=root;
    240   if (t==PACKAGE_CMD) root=&(basePack->idroot);
     240  BOOLEAN to_reset=FALSE;
     241  if (t==PACKAGE_CMD)
     242  {
     243    if (root!=&(basePack->idroot))
     244    {
     245      root=&(basePack->idroot);
     246      to_reset=TRUE;
     247    }
     248  }
    241249  // is it already defined in root ?
    242250  if ((h=(*root)->get(s,lev))!=NULL)
     
    302310  checkall();
    303311#endif
    304   if (t==PACKAGE_CMD) root=save_root;
     312  if (to_reset) root=save_root;
    305313  return *root;
    306314
     
    310318    //listall();
    311319    omFree((ADDRESS)s);
    312     if (t==PACKAGE_CMD) root=save_root;
     320    if (to_reset) root=save_root;
    313321    return NULL;
    314322}
Note: See TracChangeset for help on using the changeset viewer.