changeset 32142:53ba75432f02

allow public access to octave_base_value nil_rep object * ov.h (octave_value::is_nil): New function. (octave_value::nil_rep): Now public.
author Petter T. <petter.vilhelm@gmail.com>
date Mon, 19 Jun 2023 13:27:42 -0400
parents e1aacfd46471
children 9af044b8e228
files libinterp/octave-value/ov-base.h libinterp/octave-value/ov.h
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/octave-value/ov-base.h	Mon Jun 19 13:13:03 2023 -0400
+++ b/libinterp/octave-value/ov-base.h	Mon Jun 19 13:27:42 2023 -0400
@@ -78,6 +78,7 @@
 class octave_user_code;
 class octave_fcn_handle;
 class octave_value_list;
+class octave_value_ref;
 class octave_fcn_cache;
 
 enum builtin_type_t
--- a/libinterp/octave-value/ov.h	Mon Jun 19 13:13:03 2023 -0400
+++ b/libinterp/octave-value/ov.h	Mon Jun 19 13:27:42 2023 -0400
@@ -1542,6 +1542,8 @@
 
   octave_value_ref * ref_rep () { return m_rep->ref_rep (); }
 
+  bool is_nil (void) const { return m_rep == nil_rep (); }
+
   // True for the types based on ov-base-mat
   bool is_full_num_matrix () const
   { return m_rep->is_full_num_matrix (); }
@@ -1592,9 +1594,9 @@
 //! The real representation.
   octave_base_value *m_rep;
 
-private:
+  static OCTINTERP_API octave_base_value * nil_rep ();
 
-  static OCTINTERP_API octave_base_value * nil_rep ();
+private:
 
   OCTINTERP_API assign_op unary_op_to_assign_op (unary_op op);