Changeset e6d6935 in tol


Ignore:
Timestamp:
Feb 8, 2012, 7:01:46 PM (15 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
bedce5a
Parents:
258606d
Message:

Setting specific pointer emptyHashKey_ instead of generic NULL

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

File:
1 edited

Legend:

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

    r258606d re6d6935  
    6464static BStruct* strNameBlockMemberInfo_  = NULL;
    6565static BStruct* strClassMemberInfo_  = NULL;
     66static char* emptyHashKey_ = NULL;
    6667
    6768//--------------------------------------------------------------------
    … …  
    8586  if(BNameBlock_IsInitialized()) { return(false); }
    8687  unknown_ = new BNameBlock;
    87   SetEmptyKey  (using_,               NULL);
     88//emptyHashKey_ = new char(64);
     89//sprintf(emptyHashKey_, "_#_&¬!?_NameBlock_empty_hash_key_");
     90  SetEmptyKey  (using_,               emptyHashKey_);
    8891  SetEmptyKey  (usingSymbolsByClass_, BObjClassify::null_);
    89   SetEmptyKey  (usingSymbols_,        NULL);
     92  SetEmptyKey  (usingSymbols_,        emptyHashKey_);
    9093  SetDeletedKey(usingSymbols_,        name_del_key());
    9194
    … …  
    127130  startedPackage(false)
    128131{
    129   SetEmptyKey(public_ ,NULL);
    130   SetEmptyKey(private_,NULL);
     132  SetEmptyKey(public_ ,emptyHashKey_);
     133  SetEmptyKey(private_,emptyHashKey_);
    131134#if (__USE_POOL__==__POOL_BFSMEM__)
    132135  short isAssigned = BFSMEM_Hndlr->IsAssigned(this,this->GetPageNum());
    … …  
    155158  startedPackage(false)
    156159{
    157   SetEmptyKey(public_ ,NULL);
    158   SetEmptyKey(private_,NULL);
     160  SetEmptyKey(public_ ,emptyHashKey_);
     161  SetEmptyKey(private_,emptyHashKey_);
    159162#if (__USE_POOL__==__POOL_BFSMEM__)
    160163  short isAssigned = BFSMEM_Hndlr->IsAssigned(this,this->GetPageNum());
    … …  
    183186  startedPackage(false)
    184187{
     188  SetEmptyKey(public_ ,emptyHashKey_);
     189  SetEmptyKey(private_,emptyHashKey_);
    185190#if (__USE_POOL__==__POOL_BFSMEM__)
    186191  short isAssigned = BFSMEM_Hndlr->IsAssigned(this,this->GetPageNum());
    … …  
    580585        if(cls && cls->Name()=="BlockSamplerStdLinear" && name=="aux")
    581586        {
    582           Std(BText("\nTRACE BNameBlock::EvaluateTree member [")+(n+1)+"]"+
     587        //Std(BText("\nTRACE BNameBlock::EvaluateTree member [")+(n+1)+"]"+
    583588            fullName+"::"+mbr->name_+
    584589            "  position_="+(memberOwner.member_[n]->position_+1)+"\n");
Note: See TracChangeset for help on using the changeset viewer.