Changeset 6306f69 in tol


Ignore:
Timestamp:
Dec 27, 2010, 9:22:30 AM (16 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
239a237
Parents:
f4cc2f5
Message:

Fixes #908

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/lang/language.cpp

    rf4cc2f5 r6306f69  
    13371337
    13381338//--------------------------------------------------------------------
    1339 static 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);
     1339static void PkgStartActions(
     1340  BSyntaxObject* pkg,
     1341  const BText& package,
     1342  const BText path)
     1343//--------------------------------------------------------------------
     1344{
     1345  BNameBlock& nb = NameBlock(pkg);
     1346  if(!nb.startedPackage)
     1347  {
     1348    nb.startedPackage = true;
     1349    BText startActionsExpr = package+"::StartActions(0)";
     1350    bool oldRunningUseModule = BOis::SetRunningUseModule(false);
     1351    BText oldDir = BDir::GetCurrent();
     1352    BDir::ChangeCurrent( GetFilePath(path) );
     1353    BSyntaxObject* startActions = GraReal()->EvaluateExpr(startActionsExpr);
     1354    BDir::ChangeCurrent(oldDir);
     1355    BOis::SetRunningUseModule(oldRunningUseModule);
     1356  //Std(BText("\nTRACE startActionsExpr =")+startActionsExpr+" "+((startActions)?"OK":"FAIL")+"\n");
     1357    DESTROY(startActions);
     1358  }
    13511359}
    13521360
    … …  
    13871395  bool ok = pkg!=NULL;
    13881396  if(ok) {
    1389     BNameBlock& nb = NameBlock(pkg);
    1390     if(!nb.startedPackage)
    1391     {
    1392       PkgStartActions(package, path);
    1393       nb.startedPackage = true;
    1394     }
     1397    PkgStartActions(pkg, package, path);
    13951398    return(pkg);
    13961399  }
    … …  
    14361439          required_ = Cons(pkg, required_);
    14371440          BNameBlock::AddGlobalRequiredPackage(package);
    1438           PkgStartActions(package, path);
     1441          PkgStartActions(pkg, package, path);
    14391442        }
    14401443      }     
Note: See TracChangeset for help on using the changeset viewer.