Changeset 7efd6dd in tol


Ignore:
Timestamp:
Dec 27, 2010, 8:50:49 AM (16 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
f4cc2f5
Parents:
137d85f
Message:

Fixes #908

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@2942 be4846ae-f051-483a-831f-b64e7d08527f

Location:
tol
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tol/btol/bgrammar/nameblock.cpp

    r137d85f r7efd6dd  
    103103  nonPrivateMembers_(0),
    104104  requiredPackages_(NULL),
    105   doingRebuildFullNameDeep(false)
     105  doingRebuildFullNameDeep(false),
     106  startedPackage(false)
    106107{
    107108  SetEmptyKey(public_ ,NULL);
    … …  
    126127  nonPrivateMembers_(0),
    127128  requiredPackages_(NULL),
    128   doingRebuildFullNameDeep(false)
     129  doingRebuildFullNameDeep(false),
     130  startedPackage(false)
    129131{
    130132  SetEmptyKey(public_ ,NULL);
    … …  
    149151  nonPrivateMembers_(0),
    150152  requiredPackages_(NULL),
    151   doingRebuildFullNameDeep(false)
     153  doingRebuildFullNameDeep(false),
     154  startedPackage(false)
    152155{
    153156  short isAssigned = BFSMEM_Hndlr->IsAssigned(this,this->_bfsm_PageNum__);
  • tol/btol/bgrammar/tol_bnameblock.h

    r137d85f r7efd6dd  
    8888  bool doingRebuildFullNameDeep;
    8989public:
     90  bool startedPackage;
    9091  static bool Initialize();
    9192  static BNameBlock&  Unknown() { return(*unknown_); }
  • tol/lang/language.cpp

    r137d85f r7efd6dd  
    13311331  BOis::SetRunningUseModule(oldRunningUseModule);
    13321332  if(!fai) { return(false); }
    1333   bool ok = (bool)Real(fai);
     1333  bool ok = (bool)(Real(fai)!=0);
    13341334  DESTROY(fai);
    13351335  return(ok);
     1336}
     1337
     1338//--------------------------------------------------------------------
     1339static void PkgStartActions(const BText& package, const BText path)
     1340//--------------------------------------------------------------------
     1341{
     1342  BText startActionsExpr = package+"::StartActions(0)";
     1343  bool oldRunningUseModule = BOis::SetRunningUseModule(false);
     1344  BText oldDir = BDir::GetCurrent();
     1345  BDir::ChangeCurrent( GetFilePath(path) );
     1346  BSyntaxObject* startActions = GraReal()->EvaluateExpr(startActionsExpr);
     1347  BDir::ChangeCurrent(oldDir);
     1348  BOis::SetRunningUseModule(oldRunningUseModule);
     1349//Std(BText("\nTRACE startActionsExpr =")+startActionsExpr+" "+((startActions)?"OK":"FAIL")+"\n");
     1350  DESTROY(startActions);
    13361351}
    13371352
    … …  
    13661381  }
    13671382  BSyntaxObject* pkg = GraNameBlock()->FindOperand(package,false);
    1368   bool ok = pkg!=NULL;
    1369   if(ok) { return(pkg); }
    13701383  BText path = LocalPath(package_version);
    13711384//Std(BText("\nTRACE BPackage::Load 3 path='")+path+"'");
    13721385  BDir dirPath = path;
     1386
     1387  bool ok = pkg!=NULL;
     1388  if(ok) {
     1389    BNameBlock& nb = NameBlock(pkg);
     1390    if(!nb.startedPackage)
     1391    {
     1392      PkgStartActions(package, path);
     1393      nb.startedPackage = true;
     1394    }
     1395    return(pkg);
     1396  }
    13731397//Std(BText("\nTRACE BPackage::Load 3 dirPath='")+dirPath.Name()+"'");
    13741398  if(!ok)
    13751399  {
    1376     ok=dirPath.Exist();
     1400    ok=dirPath.Exist()!=0;
    13771401    if(!ok)
    13781402    {
    … …  
    13851409        zip.Close();
    13861410      }
    1387       ok=dirPath.Exist();
     1411      ok=dirPath.Exist()!=0;
    13881412    }
    13891413  //Std(BText("\nTRACE BPackage::Load 4 ok=")+ok);
    … …  
    14121436          required_ = Cons(pkg, required_);
    14131437          BNameBlock::AddGlobalRequiredPackage(package);
    1414           BText startActionsExpr = package+"::StartActions(0)";
    1415           bool oldRunningUseModule = BOis::SetRunningUseModule(false);
    1416           BText oldDir = BDir::GetCurrent();
    1417           BDir::ChangeCurrent( GetFilePath(path) );
    1418           BSyntaxObject* startActions = GraReal()->EvaluateExpr(startActionsExpr);
    1419           BDir::ChangeCurrent(oldDir);
    1420           BOis::SetRunningUseModule(oldRunningUseModule);
    1421         //Std(BText("\nTRACE startActionsExpr =")+startActionsExpr+" "+((startActions)?"OK":"FAIL")+"\n");
    1422           DESTROY(startActions);
     1438          PkgStartActions(package, path);
    14231439        }
    14241440      }     
Note: See TracChangeset for help on using the changeset viewer.