# HG changeset patch # User Dario Sestito # Date 1276615816 -3600 # Node ID c6f14f20ccfdac142972dbaf7dfa77b1c580b5af # Parent 38383aab3fb8586b53daa46e793f971bed96e632 Fix _FOFF related errors. See bug 2972 diff -r 38383aab3fb8 -r c6f14f20ccfd persistentstorage/dbms/inc/D32DBAS.INL --- a/persistentstorage/dbms/inc/D32DBAS.INL Fri Jun 11 16:29:03 2010 +0100 +++ b/persistentstorage/dbms/inc/D32DBAS.INL Tue Jun 15 16:30:16 2010 +0100 @@ -135,12 +135,12 @@ inline TInt TDbBlob::CellSize() const { - return _FOFF(TDbBlob,iInline[IsInline() ? Size() : 0]); + return _FOFF_DYNAMIC(TDbBlob,iInline[IsInline() ? Size() : 0]); } inline TInt TDbBlob::InlineSize(TInt aSize) { - return _FOFF(TDbBlob,iInline[aSize]); + return _FOFF_DYNAMIC(TDbBlob,iInline[aSize]); } inline TInt TDbBlob::RefSize() diff -r 38383aab3fb8 -r c6f14f20ccfd persistentstorage/dbms/sdbms/SD_CURS.CPP --- a/persistentstorage/dbms/sdbms/SD_CURS.CPP Fri Jun 11 16:29:03 2010 +0100 +++ b/persistentstorage/dbms/sdbms/SD_CURS.CPP Tue Jun 15 16:30:16 2010 +0100 @@ -51,7 +51,7 @@ HDbsColumns* HDbsColumns::NewL(TInt aCount) { - return new(User::AllocL(_FOFF(HDbsColumns,iType[aCount]))) HDbsColumns(aCount); + return new(User::AllocL(_FOFF_DYNAMIC(HDbsColumns,iType[aCount]))) HDbsColumns(aCount); } void HDbsColumns::Check(TDbColNo aColNo) const diff -r 38383aab3fb8 -r c6f14f20ccfd persistentstorage/dbms/usql/UQ_LIKE.CPP --- a/persistentstorage/dbms/usql/UQ_LIKE.CPP Fri Jun 11 16:29:03 2010 +0100 +++ b/persistentstorage/dbms/usql/UQ_LIKE.CPP Tue Jun 15 16:30:16 2010 +0100 @@ -26,7 +26,7 @@ template inline HMatcherPattern* HMatcherPattern::Realloc(HMatcherPattern* aThis,TInt aSize) - {return STATIC_CAST(TThis*,User::ReAlloc(aThis,_FOFF(TThis,iPattern[aSize])));} + {return STATIC_CAST(TThis*,User::ReAlloc(aThis,_FOFF_DYNAMIC(TThis,iPattern[aSize])));} /** Creates a HMatcherPattern that converts the pattern into more manageable pieces diff -r 38383aab3fb8 -r c6f14f20ccfd persistentstorage/dbms/usql/UQ_MULTI.CPP --- a/persistentstorage/dbms/usql/UQ_MULTI.CPP Fri Jun 11 16:29:03 2010 +0100 +++ b/persistentstorage/dbms/usql/UQ_MULTI.CPP Tue Jun 15 16:30:16 2010 +0100 @@ -30,7 +30,7 @@ { return ( Size() & ( EGranularity - 1 ) ) == 0; } inline TInt CSqlMultiNode::Size( TInt aLeaves ) - { return _FOFF( CSqlMultiNode, iLeaves[ aLeaves ] ); } + { return _FOFF_DYNAMIC( CSqlMultiNode, iLeaves[ aLeaves ] ); } CSqlMultiNode::~CSqlMultiNode() { diff -r 38383aab3fb8 -r c6f14f20ccfd persistentstorage/dbms/ustor/US_COMP.CPP --- a/persistentstorage/dbms/ustor/US_COMP.CPP Fri Jun 11 16:29:03 2010 +0100 +++ b/persistentstorage/dbms/ustor/US_COMP.CPP Tue Jun 15 16:30:16 2010 +0100 @@ -407,7 +407,7 @@ inline HDeflateHash& HDeflateHash::NewLC(TInt aLinks) { __ASSERT(!(KDeflateMaxDistance&(KDeflateMaxDistance-1))); // ensure power of two - return *new(User::AllocLC(_FOFF(HDeflateHash,iOffset[Min(aLinks,KDeflateMaxDistance)]))) HDeflateHash; + return *new(User::AllocLC(_FOFF_DYNAMIC(HDeflateHash,iOffset[Min(aLinks,KDeflateMaxDistance)]))) HDeflateHash; } inline TInt HDeflateHash::Hash(const TUint8* aPtr) diff -r 38383aab3fb8 -r c6f14f20ccfd persistentstorage/dbms/ustor/US_INDEX.CPP --- a/persistentstorage/dbms/ustor/US_INDEX.CPP Fri Jun 11 16:29:03 2010 +0100 +++ b/persistentstorage/dbms/ustor/US_INDEX.CPP Tue Jun 15 16:30:16 2010 +0100 @@ -340,7 +340,7 @@ CDbStoreIndex::HKey* CDbStoreIndex::HKey::NewL(const CDbKey& aKey,const HDbColumnSet& aColumns) { TInt count=aKey.Count(); - HKey* self=(HKey*)User::AllocLC(_FOFF(HKey,iKeys[count])); + HKey* self=(HKey*)User::AllocLC(_FOFF_DYNAMIC(HKey,iKeys[count])); if (aKey.IsUnique()) new(self) HKey; else diff -r 38383aab3fb8 -r c6f14f20ccfd persistentstorage/dbms/utable/UT_BUF.CPP --- a/persistentstorage/dbms/utable/UT_BUF.CPP Fri Jun 11 16:29:03 2010 +0100 +++ b/persistentstorage/dbms/utable/UT_BUF.CPP Tue Jun 15 16:30:16 2010 +0100 @@ -180,7 +180,7 @@ CDbTableCursor::HHeapBuf* CDbTableCursor::HHeapBuf::NewL( CDbTableCursor& aCursor, const TDbBlob& aBlob, TDbColType aType ) { __ASSERT( aBlob.Size() <= EMaxBlobBuffer ); - TAny* mem = User::AllocL(_FOFF(HHeapBuf,iBuf[aBlob.Size()])); // get the extra size for the entries, leaves on error + TAny* mem = User::AllocL(_FOFF_DYNAMIC(HHeapBuf,iBuf[aBlob.Size()])); // get the extra size for the entries, leaves on error HHeapBuf* self = new( mem ) HHeapBuf(aCursor); // do an in place new, now we've got the memory self->PushL(); MStreamBuf* buf = aCursor.BlobsL().ReadLC( aBlob.Id(), aType ); diff -r 38383aab3fb8 -r c6f14f20ccfd persistentstorage/dbms/utable/UT_CURS.CPP --- a/persistentstorage/dbms/utable/UT_CURS.CPP Fri Jun 11 16:29:03 2010 +0100 +++ b/persistentstorage/dbms/utable/UT_CURS.CPP Tue Jun 15 16:30:16 2010 +0100 @@ -34,7 +34,7 @@ CDbTableCursor::HColumns* CDbTableCursor::HColumns::NewL(const CDbDataSource* aSource) { TInt count=aSource->ColumnCount(); - HColumns* self=(HColumns*)User::AllocL(_FOFF(HColumns,iType[count])); + HColumns* self=(HColumns*)User::AllocL(_FOFF_DYNAMIC(HColumns,iType[count])); self->iCount=count; TUint8* pp=&self->iType[0]; for (TDbColNo ii=1;ii<=count;++ii,++pp) diff -r 38383aab3fb8 -r c6f14f20ccfd persistentstorage/dbms/utable/UT_ORDER.CPP --- a/persistentstorage/dbms/utable/UT_ORDER.CPP Fri Jun 11 16:29:03 2010 +0100 +++ b/persistentstorage/dbms/utable/UT_ORDER.CPP Tue Jun 15 16:30:16 2010 +0100 @@ -90,7 +90,7 @@ inline TInt CDbOrderByStage::HOrdering::TBlobKey::Size() const { - TInt size=_FOFF(TBlobKey,iData8[iSize+3]); + TInt size=_FOFF_DYNAMIC(TBlobKey,iData8[iSize+3]); return (size&ETrunc) ? sizeof(TBlobKey) : size&~3; } @@ -109,7 +109,7 @@ { TInt count=aKey.Count(); __ASSERT(count>0); - HOrdering* self=new(User::AllocLC(_FOFF(HOrdering,iKeys[count]))) + HOrdering* self=new(User::AllocLC(_FOFF_DYNAMIC(HOrdering,iKeys[count]))) HOrdering(count,aKey.Comparison(),aTable); TKeyCol* pKey=&self->iKeys[0]; const HDbColumnSet& columns=aTable.Def().Columns(); @@ -505,7 +505,7 @@ // Class CDbOrderByStage::CKeys CDbOrderByStage::CKeys::CKeys(TInt aMaxKeySize) - :iKeys(EKeysGranularity),iMaxKeySize(_FOFF(TKey,iKey[aMaxKeySize])), + :iKeys(EKeysGranularity),iMaxKeySize(_FOFF_DYNAMIC(TKey,iKey[aMaxKeySize])), iPageSize(Max(EMinPageSize+iMaxKeySize,iMaxKeySize*EMinKeyElements)) {} diff -r 38383aab3fb8 -r c6f14f20ccfd persistentstorage/dbms/utable/UT_PRJCT.CPP --- a/persistentstorage/dbms/utable/UT_PRJCT.CPP Fri Jun 11 16:29:03 2010 +0100 +++ b/persistentstorage/dbms/utable/UT_PRJCT.CPP Tue Jun 15 16:30:16 2010 +0100 @@ -33,7 +33,7 @@ HDbColumnMap* HDbColumnMap::NewL(const RSqlColumnList& aSelect,const HDbColumnSet& aColumns) { TInt count=aSelect.Count(); - HDbColumnMap* self=(HDbColumnMap*)User::AllocLC(_FOFF(HDbColumnMap,iMap[count])); + HDbColumnMap* self=(HDbColumnMap*)User::AllocLC(_FOFF_DYNAMIC(HDbColumnMap,iMap[count])); self->iCount=count; TDbColNo* pCol=&self->iMap[0]; for (TInt ii=0;ii