diff scripts/general/private/__isequal__.m @ 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 990c9cb52e5f
children fd0a3ac60b0e
line wrap: on
line diff
--- 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)