# HG changeset patch # User jwe # Date 1050589992 0 # Node ID bfb14347a9fa3fdb08b0e73184af01afc36b0440 # Parent 5855de87265973faa291c5610e1e08ea672d8f02 [project @ 2003-04-17 14:33:12 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-04-17 John W. Eaton + + * ov-file.h (octave_file::empty_clone): Create an octave_scalar + object, not an octave_file object. + 2003-04-01 John W. Eaton * load-save.cc (hdf5_read_next_data): Extract list before diff --git a/src/ov-file.h b/src/ov-file.h --- 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;