# HG changeset patch # User jwe # Date 1108587979 0 # Node ID 47e4c91e57999e787627426fc591fa017728b853 # Parent 275a955418311f0af64bfa91c5de4fad8125ca94 [project @ 2005-02-16 21:06:19 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,8 +1,7 @@ 2005-02-16 John W. Eaton - * ov.h, ov.cc - (octave_value::octave_value (const ArrayN&, bool)): - Delete. + * ov-base-mat.h (octave_base_matrix::squeeze): Explicitly convert + result of matrix.squeeze() to MT. 2005-02-15 John W. Eaton diff --git a/src/ov-base-mat.h b/src/ov-base-mat.h --- a/src/ov-base-mat.h +++ b/src/ov-base-mat.h @@ -68,7 +68,7 @@ size_t byte_size (void) const { return matrix.byte_size (); } - octave_value squeeze (void) const { return matrix.squeeze (); } + octave_value squeeze (void) const { return MT (matrix.squeeze ()); } octave_value subsref (const std::string& type, const std::list& idx); diff --git a/src/ov.cc b/src/ov.cc --- a/src/ov.cc +++ b/src/ov.cc @@ -423,6 +423,19 @@ rep->count = 1; } +octave_value::octave_value (const ArrayN& a, bool is_csl) + : rep (0) +{ + Cell c (a); + + if (is_csl) + rep = new octave_cs_list (c); + else + rep = new octave_cell (c); + + rep->count = 1; +} + octave_value::octave_value (const Matrix& m) : rep (new octave_matrix (m)) { diff --git a/src/ov.h b/src/ov.h --- a/src/ov.h +++ b/src/ov.h @@ -189,6 +189,7 @@ octave_value (octave_time t); octave_value (double d); + octave_value (const ArrayN& a, bool is_cs_list = false); octave_value (const Cell& c, bool is_cs_list = false); octave_value (const Matrix& m); octave_value (const NDArray& nda);