equal
deleted
inserted
replaced
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()); |