--- parser3/src/include/pa_pool.h 2003/01/28 10:23:31 1.86.2.14 +++ parser3/src/include/pa_pool.h 2003/01/30 11:19:30 1.86.2.20 @@ -9,7 +9,9 @@ #ifndef PA_POOL_H #define PA_POOL_H -static const char* IDENT_POOL_H="$Date: 2003/01/28 10:23:31 $"; +static const char* IDENT_POOL_H="$Date: 2003/01/30 11:19:30 $"; + +// include #include "pa_config_includes.h" @@ -19,13 +21,13 @@ static const char* IDENT_POOL_H="$Date: # include "libxml/tree.h" #endif +// forwards + void *pa_malloc(size_t size); void *pa_calloc(size_t size); void pa_free(void *ptr); void *pa_realloc(void *ptr, size_t size); -// forwards - class Exception; class String; class Charset; @@ -219,11 +221,12 @@ public: */ #define override +#define rethrow throw -void *operator new(size_t size) { +inline void *operator new(size_t size) { return pa_malloc(size); } -void operator delete(void *ptr) { +inline void operator delete(void *ptr) { pa_free(ptr); } @@ -319,7 +322,11 @@ public: } }; -#define DECLARE_OBJECT_PTR(name) typedef object_ptr name##Ptr; +#define DECLARE_OBJECT_PTR(name) \ + typedef object_ptr name##Ptr + +// typedef object_ptr name##Ptr; \ +// const object_ptr name##PtrZero(0); /// TEMPLATE CLASS smart_ptr, stolen from stl:auto_ptr template