persistentstorage/dbms/utable/UT_BUF.CPP
branchGCC_SURGE
changeset 26 c6f14f20ccfd
parent 0 08ec8eefde2f
equal deleted inserted replaced
23:38383aab3fb8 26:c6f14f20ccfd
   178 	{}
   178 	{}
   179 
   179 
   180 CDbTableCursor::HHeapBuf* CDbTableCursor::HHeapBuf::NewL( CDbTableCursor& aCursor, const TDbBlob& aBlob, TDbColType aType )
   180 CDbTableCursor::HHeapBuf* CDbTableCursor::HHeapBuf::NewL( CDbTableCursor& aCursor, const TDbBlob& aBlob, TDbColType aType )
   181 	{
   181 	{
   182 	__ASSERT( aBlob.Size() <= EMaxBlobBuffer );
   182 	__ASSERT( aBlob.Size() <= EMaxBlobBuffer );
   183 	TAny* mem = User::AllocL(_FOFF(HHeapBuf,iBuf[aBlob.Size()]));	// get the extra size for the entries, leaves on error
   183 	TAny* mem = User::AllocL(_FOFF_DYNAMIC(HHeapBuf,iBuf[aBlob.Size()]));	// get the extra size for the entries, leaves on error
   184 	HHeapBuf* self = new( mem ) HHeapBuf(aCursor);	// do an in place new, now we've got the memory
   184 	HHeapBuf* self = new( mem ) HHeapBuf(aCursor);	// do an in place new, now we've got the memory
   185 	self->PushL();
   185 	self->PushL();
   186 	MStreamBuf* buf = aCursor.BlobsL().ReadLC( aBlob.Id(), aType );
   186 	MStreamBuf* buf = aCursor.BlobsL().ReadLC( aBlob.Id(), aType );
   187 	__DEBUG( TInt sz = ) buf->ReadL( &self->iBuf[0], aBlob.Size() );
   187 	__DEBUG( TInt sz = ) buf->ReadL( &self->iBuf[0], aBlob.Size() );
   188 	__ASSERT(sz == aBlob.Size());
   188 	__ASSERT(sz == aBlob.Size());