Mercurial > hg > octave-lyh
diff src/pt-const.h @ 13969:3b5afcec526b
* pt-const.h, pt-const.cc: Use macros to declare and define octave_allocator.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 01 Dec 2011 04:04:50 -0500 |
parents | fd0a3ac60b0e |
children | 72c96de7a403 |
line wrap: on
line diff
--- a/src/pt-const.h +++ b/src/pt-const.h @@ -55,10 +55,6 @@ bool has_magic_end (void) const { return false; } - void *operator new (size_t size) { return allocator.alloc (size); } - - void operator delete (void *p, size_t size) { allocator.free (p, size); } - // Type. It would be nice to eliminate the need for this. bool is_constant (void) const { return true; } @@ -91,9 +87,6 @@ private: - // For custom memory management. - static octave_allocator allocator; - // The actual value that this constant refers to. octave_value val; @@ -105,6 +98,8 @@ tree_constant (const tree_constant&); tree_constant& operator = (const tree_constant&); + + DECLARE_OCTAVE_ALLOCATOR }; #endif