# HG changeset patch # User John W. Eaton # Date 1294687928 18000 # Node ID caf1fd72f58792fd9103eeadcae4c157d0043469 # Parent 8a40037533e2199e378501878b4e50265452c673 __isequal__: avoid possible overloading of struct function for objects diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,9 @@ +2011-01-10 John W. Eaton + + * 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 * plot/orient.m, statistics/tests/kolmogorov_smirnov_test.m, diff --git a/scripts/general/private/__isequal__.m b/scripts/general/private/__isequal__.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)