--- parser3/src/include/pa_memory.h 2003/02/21 10:58:57 1.1.2.2 +++ parser3/src/include/pa_memory.h 2003/02/26 11:29:58 1.1.2.4 @@ -9,7 +9,7 @@ #ifndef PA_MEMORY_H #define PA_MEMORY_H -static const char* IDENT_MEMORY_H="$Date: 2003/02/21 10:58:57 $"; +static const char* IDENT_MEMORY_H="$Date: 2003/02/26 11:29:58 $"; // include @@ -150,6 +150,9 @@ public: operator bool() const { return get()!=0; } + bool operator !() const { + return get()==0; + } operator T*() const { return ptr; } @@ -165,6 +168,9 @@ public: inline void *operator new[] (size_t size) { return pa_malloc(size); } +inline void *operator new[] (size_t size, int /*zero, just flag to use calloc instead of malloc*/) { + return pa_calloc(size); +} inline void operator delete[] (void *ptr) { pa_free(ptr); }