[v3,46/50] Make struct value data members private

Message ID 20230209-submit-value-fixups-2023-v3-46-45e91a20c742@tromey.com
State Committed
Commit 8f4135314ae6e1a98a36295c85af5b246dfa00ff
Headers
Series Use methods for struct value |

Commit Message

Tom Tromey Feb. 13, 2023, 3:16 a.m. UTC
  This hoists the 'private' in struct value to also encompass the data
members.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
---
 gdb/value.h | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
  

Patch

diff --git a/gdb/value.h b/gdb/value.h
index 225a3c851c4..7708530ddcc 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -609,6 +609,8 @@  struct value
      in the history.  The value is removed from the value chain.  */
   int record_latest ();
 
+private:
+
   /* Type of value; either not an lval, or one of the various
      different possible kinds of lval.  */
   enum lval_type m_lval = not_lval;
@@ -785,8 +787,6 @@  struct value
      loaded from the inferior.  */
   ULONGEST m_limited_length = 0;
 
-private:
-
   /* Allocate a value and its contents for type TYPE.  If CHECK_SIZE
      is true, then apply the usual max-value-size checks.  */
   static struct value *allocate (struct type *type, bool check_size);
@@ -806,15 +806,11 @@  struct value
      return failure here, which will ultimately throw an error.  */
   bool set_limited_array_length ();
 
-public: /* Temporary */
-
   /* Allocate the contents of this value if it has not been allocated
      yet.  If CHECK_SIZE is true, then apply the usual max-value-size
      checks.  */
   void allocate_contents (bool check_size);
 
-private:
-
   /* Helper function for value_contents_eq.  The only difference is that
      this function is bit rather than byte based.