"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/include/fb_blk.h" between
Firebird-3.0.2.32703-0.tar.bz2 and Firebird-3.0.4.33054-0.tar.bz2

About: Firebird is a relational database offering many ANSI SQL standard features.

fb_blk.h  (Firebird-3.0.2.32703-0.tar.bz2):fb_blk.h  (Firebird-3.0.4.33054-0.tar.bz2)
skipping to change at line 156 skipping to change at line 156
MemoryPool::globalFree(mem); MemoryPool::globalFree(mem);
} }
void operator delete[](void* mem) void operator delete[](void* mem)
{ {
if (mem) if (mem)
MemoryPool::globalFree(mem); MemoryPool::globalFree(mem);
} }
private: private:
static const IPTR nullmem = 0;
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnew-returns-null" #pragma clang diagnostic ignored "-Wnew-returns-null"
#endif #endif
// These operators are off-limits // These operators are off-limits
void* operator new(size_t) { return 0; } void* operator new(size_t) { return (void*)nullmem; }
void* operator new[](size_t) { return 0; } void* operator new[](size_t) { return (void*)nullmem; }
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic pop #pragma clang diagnostic pop
#endif #endif
}; };
template<typename RPT, BlockType BLOCK_TYPE = type_unknown> template<typename RPT, BlockType BLOCK_TYPE = type_unknown>
class pool_alloc_rpt : public TypedHandle<BLOCK_TYPE> class pool_alloc_rpt : public TypedHandle<BLOCK_TYPE>
{ {
public: public:
skipping to change at line 195 skipping to change at line 196
p.deallocate(mem); p.deallocate(mem);
} }
void operator delete(void* mem) void operator delete(void* mem)
{ {
if (mem) if (mem)
MemoryPool::globalFree(mem); MemoryPool::globalFree(mem);
} }
private: private:
static const IPTR nullmem = 0;
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnew-returns-null" #pragma clang diagnostic ignored "-Wnew-returns-null"
#endif #endif
// These operations are not supported on static repeat-base objects // These operations are not supported on static repeat-base objects
void* operator new[](size_t /*s*/, MemoryPool& /*p*/) void* operator new[](size_t /*s*/, MemoryPool& /*p*/)
{ {
return 0; return (void*)nullmem;
} }
void operator delete[](void* /*mem*/, MemoryPool& /*p*/) void operator delete[](void* /*mem*/, MemoryPool& /*p*/)
{ {
} }
void operator delete[](void* /*mem*/) void operator delete[](void* /*mem*/)
{ {
} }
// These operators are off-limits // These operators are off-limits
void* operator new(size_t) { return 0; } void* operator new(size_t) { return (void*)nullmem; }
void* operator new[](size_t) { return 0; } void* operator new[](size_t) { return (void*)nullmem; }
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic pop #pragma clang diagnostic pop
#endif #endif
}; };
#endif // INCLUDE_FB_BLK #endif // INCLUDE_FB_BLK
 End of changes. 5 change blocks. 
5 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)