Mercurial > hg > octave-nkf
changeset 11475:caf1fd72f587
__isequal__: avoid possible overloading of struct function for objects
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 10 Jan 2011 14:32:08 -0500 |
parents | 8a40037533e2 |
children | ff7e0776ba0f |
files | scripts/ChangeLog scripts/general/private/__isequal__.m |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,9 @@ +2011-01-10 John W. Eaton <jwe@octave.org> + + * general/private/__isequal__.m: Use builtin ("struct", ...) to + convert objects to a structs to avoid possible overloading of + the struct function. + 2011-01-09 Rik <octave@nomad.inbox5.com> * plot/orient.m, statistics/tests/kolmogorov_smirnov_test.m,
--- a/scripts/general/private/__isequal__.m +++ b/scripts/general/private/__isequal__.m @@ -85,8 +85,9 @@ ## From here on, compare objects as if they were structures. if (isobject (x)) - x = struct (x); - varargin = cellfun (@struct, varargin, "uniformoutput", false); + x = builtin ("struct", x); + varargin = cellfun (@(x) builtin ("struct", x), varargin, + "uniformoutput", false); endif if (t)