changeset 27419:40fc49d73ce2

Rename meta.class property to "SuperclassList" for Matlab compatibility (bug #55476). * NEWS: Announce change and eventual removal of alias "SuperClassList". * cdef-manager.cc (cdef_manager): Rename property to "SuperclassList". Add another property "SuperClassList" which points to function "meta.class>get.SuperclassList" as an alias. Add FIXME to remove in version 8.1.
author Rik <rik@octave.org>
date Tue, 17 Sep 2019 13:20:08 -0700
parents c40be2cf044d
children edeacebc8800
files NEWS libinterp/octave-value/cdef-manager.cc
diffstat 2 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Tue Sep 17 20:13:05 2019 +0200
+++ b/NEWS	Tue Sep 17 13:20:08 2019 -0700
@@ -80,6 +80,9 @@
   measured in points, *not* pixels.  Compared to previous versions
   of Octave, some lines and markers will appear 4/3 larger.
 
+- The meta.class property "SuperClassList" has been renamed
+  "Superclasslist" for Matlab compatibility.  The original name will
+  exist as an alias until Octave version 8.1.
 
 ### Alphabetical list of new functions added in Octave 6
 
--- a/libinterp/octave-value/cdef-manager.cc	Tue Sep 17 20:13:05 2019 +0200
+++ b/libinterp/octave-value/cdef-manager.cc	Tue Sep 17 13:20:08 2019 -0700
@@ -417,9 +417,18 @@
                       "public", Matrix (), "private"));
 
     m_meta_class.install_property
+      (make_property (m_meta_class, "SuperclassList",
+                      make_fcn_handle (class_get_superclasses,
+                                       "meta.class>get.SuperclassList"),
+                      "public", Matrix (), "private"));
+
+    // FIXME: Matlab supports this property under "SuperclassList".
+    //        Octave, however, has supported this under "SuperClassList".
+    //        Alias the property.  Remove in Octave version 8.1.
+    m_meta_class.install_property
       (make_property (m_meta_class, "SuperClassList",
                       make_fcn_handle (class_get_superclasses,
-                                       "meta.class>get.SuperClassList"),
+                                       "meta.class>get.SuperclassList"),
                       "public", Matrix (), "private"));
 
     // meta.class methods