Mercurial > hg > octave-terminal
changeset 4376:bfb14347a9fa
[project @ 2003-04-17 14:33:12 by jwe]
author | jwe |
---|---|
date | Thu, 17 Apr 2003 14:33:12 +0000 |
parents | 5855de872659 |
children | ced2ac0cff7b |
files | src/ChangeLog src/ov-file.h |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-04-17 John W. Eaton <jwe@bevo.che.wisc.edu> + + * ov-file.h (octave_file::empty_clone): Create an octave_scalar + object, not an octave_file object. + 2003-04-01 John W. Eaton <jwe@bevo.che.wisc.edu> * load-save.cc (hdf5_read_next_data): Extract list before
--- a/src/ov-file.h +++ b/src/ov-file.h @@ -35,6 +35,7 @@ #include "oct-alloc.h" #include "oct-stream.h" #include "ov-base.h" +#include "ov-scalar.h" #include "ov-typeinfo.h" class tree_walker; @@ -61,7 +62,10 @@ ~octave_file (void) { } octave_value *clone (void) const { return new octave_file (*this); } - octave_value *empty_clone (void) const { return new octave_file (); } + + // For compatibility, a file object should appear as if it is a + // scalar object, in contexts where that is needed. + octave_value *empty_clone (void) const { return new octave_scalar (); } type_conv_fcn numeric_conversion_function (void) const;