Mercurial > octave
diff src/ov-ch-mat.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 | 97abf5d72929 |
line wrap: on
line diff
--- a/src/ov-ch-mat.h Thu Nov 07 05:16:55 1996 +0000 +++ b/src/ov-ch-mat.h Thu Nov 07 16:48:16 1996 +0000 @@ -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. +// Character matrix values. class octave_char_matrix : public octave_base_value @@ -74,10 +75,11 @@ octave_value *clone (void) { return new octave_char_matrix (*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); } int rows (void) const { return matrix.rows (); } int columns (void) const { return matrix.columns (); } @@ -129,8 +131,12 @@ charMatrix matrix; + static octave_allocator allocator; + + // Type id of character matrix objects, set by register_type(). static int t_id; + // Type name of character matrix objects, defined in ov-ch-mat.cc. static const string t_name; };