diff options
author | Tom Tromey <tom@tromey.com> | 2023-02-01 08:34:58 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:22:20 -0700 |
commit | 43b5fba22365c6ddd0d60324833f279364b577e7 (patch) | |
tree | b7c62a6b7f392a9f90d50f761fe7d84dcb47cbe8 /gdb/value.h | |
parent | 8f4135314ae6e1a98a36295c85af5b246dfa00ff (diff) | |
download | gdb-43b5fba22365c6ddd0d60324833f279364b577e7.zip gdb-43b5fba22365c6ddd0d60324833f279364b577e7.tar.gz gdb-43b5fba22365c6ddd0d60324833f279364b577e7.tar.bz2 |
Make ~value private
At the end of this series, I belatedly realized that values should
only be destroyed by value_decref. This patch marks the the
destructor private to enforce this.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/value.h')
-rw-r--r-- | gdb/value.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/value.h b/gdb/value.h index 7708530..0723066 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -143,6 +143,12 @@ private: { } + /* Values can only be destroyed via the reference-counting + mechanism. */ + ~value (); + + DISABLE_COPY_AND_ASSIGN (value); + public: /* Allocate a lazy value for type TYPE. Its actual content is @@ -170,10 +176,6 @@ public: storage. */ struct value *copy () const; - ~value (); - - DISABLE_COPY_AND_ASSIGN (value); - /* Type of the value. */ struct type *type () const { return m_type; } |