Mercurial > hg > octave-nkf
diff src/ov-complex.h @ 2477:3d905d3820a4
[project @ 1996-11-07 16:46:11 by jwe]
author | jwe |
---|---|
date | Thu, 07 Nov 1996 16:48:16 +0000 |
parents | 1573640a9994 |
children | 8b262e771614 |
line wrap: on
line diff
--- a/src/ov-complex.h +++ b/src/ov-complex.h @@ -34,6 +34,7 @@ class ostream; #include "mx-base.h" +#include "oct-alloc.h" #include "str-vec.h" #include "error.h" @@ -45,7 +46,7 @@ class tree_walker; -// Real scalar values. +// Complex scalar values. class octave_complex : public octave_base_value @@ -65,10 +66,11 @@ octave_value *clone (void) { return new octave_complex (*this); } -#if 0 - void *operator new (size_t size); - void operator delete (void *p, size_t size); -#endif + void *operator new (size_t size) + { return allocator.alloc (size); } + + void operator delete (void *p, size_t size) + { allocator.free (p, size); } octave_value *try_narrowing_conversion (void); @@ -133,8 +135,12 @@ Complex scalar; + static octave_allocator allocator; + + // Type id of complex scalar objects, set in register_type(). static int t_id; + // Type name of complex scalar objects, defined in ov-complex.cc. static const string t_name; };