aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 14:22:13 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:22:16 -0700
commitd3824ae14ac64c10733537969a0bd58a9385cbf2 (patch)
treefbc17cc6337a8a84ba2d6fba295c8c42c270e503
parente989e63761c66d632e1e3b9b40feb12e76cc5dd3 (diff)
downloadgdb-d3824ae14ac64c10733537969a0bd58a9385cbf2.zip
gdb-d3824ae14ac64c10733537969a0bd58a9385cbf2.tar.gz
gdb-d3824ae14ac64c10733537969a0bd58a9385cbf2.tar.bz2
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>
-rw-r--r--gdb/value.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/gdb/value.h b/gdb/value.h
index 5738584..b18eace 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.