changeset 29690:f625b7670c0e

* cdef-class.cc: Comments about possible way to fix bug #60593.
author John W. Eaton <jwe@octave.org>
date Tue, 18 May 2021 09:08:45 -0400
parents 26ad902a6749
children 67eccd062618 dcb8f78d0f6b
files libinterp/octave-value/cdef-class.cc
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/octave-value/cdef-class.cc	Tue May 18 09:01:19 2021 +0200
+++ b/libinterp/octave-value/cdef-class.cc	Tue May 18 09:08:45 2021 -0400
@@ -907,6 +907,11 @@
           retval.put ("ContainingPackage", to_ov (pack));
       }
 
+    // FIXME: instead of attaching attributes here, pass them to
+    // cdef_manager::make_method.  The classdef manager contains a meta
+    // object with a list of all valid properties that can be used to
+    // validate the attribute list (see bug #60593).
+
     // Class attributes
 
     if (t->attribute_list ())
@@ -993,6 +998,13 @@
                                   << ": " << mname << std::endl;
 #endif
 
+                        // FIXME: instead of attaching attributes here,
+                        // pass them to cdef_manager::make_method.  The
+                        // classdef manager contains a meta object with
+                        // a list of all valid properties that can be
+                        // used to validate the attribute list (see bug
+                        // #60593).
+
                         for (auto& attrnm_val : amap)
                           meth.put (attrnm_val.first, attrnm_val.second);
 
@@ -1108,6 +1120,12 @@
                         prop.put ("DefaultValue", pvalue);
                       }
 
+                    // FIXME: instead of attaching attributes here, pass
+                    // them to cdef_manager::make_property.  The
+                    // classdef manager contains a meta object with a
+                    // list of all valid properties that can be used to
+                    // validate the attribute list (see bug #60593).
+
                     // Install property attributes.  This is done before assigning
                     // the property accessors so we can do validation by using
                     // cdef_property methods.