From maintainers-request at octave dot org Tue Nov 16 15:49:30 2004 Subject: Re: int octave_value::numel (void) const; From: David Bateman To: maintainers at octave dot org Date: Tue, 16 Nov 2004 22:49:14 +0100 --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Try the attached patch, though I can't test it due to the configure problems I'm having D. -- David Bateman David dot Bateman at motorola dot com Motorola CRM +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 Gif-Sur-Yvette FRANCE The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch *** ./src/ov.h.orig 2004-11-16 20:42:36.000000000 +0100 --- ./src/ov.h 2004-11-16 20:48:19.000000000 +0100 *************** *** 360,366 **** int ndims (void) const; ! int numel (void) const; virtual size_t byte_size (void) const { return rep->byte_size (); } --- 360,367 ---- int ndims (void) const; ! virtual int numel (void) const ! { return rep->numel (); } virtual size_t byte_size (void) const { return rep->byte_size (); } *** ./src/ov.cc.orig 2004-11-16 20:42:40.000000000 +0100 --- ./src/ov.cc 2004-11-16 20:43:19.000000000 +0100 *************** *** 1061,1074 **** return n_dims; } - int - octave_value::numel (void) const - { - dim_vector dv = dims (); - - return dv.numel (); - } - Cell octave_value::cell_value (void) const { --- 1061,1066 ---- *** ./src/ov-base.h.orig 2004-11-16 20:42:54.000000000 +0100 --- ./src/ov-base.h 2004-11-16 20:44:05.000000000 +0100 *************** *** 96,101 **** --- 96,103 ---- dim_vector dims (void) const { return dim_vector (-1, -1); } + int numel (void) const { return dims ().numel (); } + size_t byte_size (void) const { return 0; } octave_value reshape (const dim_vector&) const; --ikeVEW9yuYc//A+q--