public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Move value_ref_policy methods out-of-line
@ 2023-02-13 22:29 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-02-13 22:29 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d3824ae14ac64c10733537969a0bd58a9385cbf2

commit d3824ae14ac64c10733537969a0bd58a9385cbf2
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Jan 31 14:22:13 2023 -0700

    Move value_ref_policy methods out-of-line
    
    This moves the value_ref_policy methods to be defined out-of-line.
    This is a necessary step to change value_incref and value_decref to be
    methods of value.
    
    Approved-By: Simon Marchi <simon.marchi@efficios.com>

Diff:
---
 gdb/value.h | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/gdb/value.h b/gdb/value.h
index 57385842919..b18eacef15b 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -124,15 +124,8 @@ extern void value_decref (struct value *val);
 
 struct value_ref_policy
 {
-  static void incref (struct value *ptr)
-  {
-    value_incref (ptr);
-  }
-
-  static void decref (struct value *ptr)
-  {
-    value_decref (ptr);
-  }
+  static void incref (struct value *ptr);
+  static void decref (struct value *ptr);
 };
 
 /* A gdb:;ref_ptr pointer to a struct value.  */
@@ -677,6 +670,18 @@ private:
 			 int length) const;
 };
 
+inline void
+value_ref_policy::incref (struct value *ptr)
+{
+  value_incref (ptr);
+}
+
+inline void
+value_ref_policy::decref (struct value *ptr)
+{
+  value_decref (ptr);
+}
+
 /* Returns value_type or value_enclosing_type depending on
    value_print_options.objectprint.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-13 22:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-13 22:29 [binutils-gdb] Move value_ref_policy methods out-of-line Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).