comparison scripts/general/private/__isequal__.m @ 18447:ff7e7928f160 stable

Fix isequal* parse failure when comparing object to non-object (bug #41531). * __isequal__.m: Check varargin is an object before attempting to convert to struct.
author Felipe G. Nievinski <fgnievinski@gmail.com>
date Mon, 10 Feb 2014 13:00:44 -0200
parents d63878346099
children fcd87f68af4f
comparison
equal deleted inserted replaced
18444:8858d0ccfc93 18447:ff7e7928f160
80 endif 80 endif
81 81
82 ## From here on, compare objects as if they were structures. 82 ## From here on, compare objects as if they were structures.
83 if (isobject (x)) 83 if (isobject (x))
84 x = builtin ("struct", x); 84 x = builtin ("struct", x);
85 varargin = cellfun (@(x) builtin ("struct", x), varargin, 85 for i = 1:numel (varargin)
86 "uniformoutput", false); 86 if (! isobject (varargin{i}))
87 break;
88 endif
89 varargin{i} = builtin ("struct", varargin{i});
90 endfor
87 endif 91 endif
88 92
89 if (t) 93 if (t)
90 ## Check individual classes. 94 ## Check individual classes.
91 if (isstruct (x)) 95 if (isstruct (x))