Fix _FOFF related errors. See bug 2972
--- 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()
--- 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
--- 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 <class T,class D>
inline HMatcherPattern<T,D>* HMatcherPattern<T,D>::Realloc(HMatcherPattern<T,D>* 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
--- 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()
{
--- 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)
--- 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
--- 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 );
--- 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)
--- 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))
{}
--- 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<count;++ii)
--- a/persistentstorage/dbms/utable/UT_SCHMA.CPP Fri Jun 11 16:29:03 2010 +0100
+++ b/persistentstorage/dbms/utable/UT_SCHMA.CPP Tue Jun 15 16:30:16 2010 +0100
@@ -108,7 +108,7 @@
HDbColumnSet* HDbColumnSet::NewL(TInt aCount)
{
- return new(User::AllocL(_FOFF(HDbColumnSet,iColumns[aCount]))) HDbColumnSet(aCount);
+ return new(User::AllocL(_FOFF_DYNAMIC(HDbColumnSet,iColumns[aCount]))) HDbColumnSet(aCount);
}
HDbColumnSet::HDbColumnSet(TInt aCount)
--- a/persistentstorage/store/UBTREE/UB_INL.CPP Fri Jun 11 16:29:03 2010 +0100
+++ b/persistentstorage/store/UBTREE/UB_INL.CPP Tue Jun 15 16:30:16 2010 +0100
@@ -197,7 +197,7 @@
EXPORT_C void TBtreeInlineIndexOrg::SetEntrySize(TInt aSize)
{
__ASSERT_DEBUG(aSize<=KMaxBtreeKeyLength,Panic(EBadEntrySize));
- iEntrySize=_FOFF(SEntry,iKey[Align4(aSize)]);
+ iEntrySize=_FOFF_DYNAMIC(SEntry,iKey[Align4(aSize)]);
iMaxEntries=(KPoolPageSize-sizeof(SHeader)-sizeof(TPageRef))/iEntrySize;
}