This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Remove make_cleanup_value_free_to_mark
- From: Tom Tromey <tromey at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 19 Jul 2018 14:55:46 -0000
- Subject: [binutils-gdb] Remove make_cleanup_value_free_to_mark
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4581dc8297381651284e2f4a9f835eebcc6f2328
commit 4581dc8297381651284e2f4a9f835eebcc6f2328
Author: Tom Tromey <tom@tromey.com>
Date: Thu Jul 19 08:49:58 2018 -0600
Remove make_cleanup_value_free_to_mark
Pedro's patch to introduce gdbscm_wrap removed the last caller of
make_cleanup_value_free_to_mark. This patch removes this function.
I'm checking this in as obvious. Tested by rebuilding, and by
grepping.
gdb/ChangeLog
2018-07-19 Tom Tromey <tom@tromey.com>
* utils.c (do_value_free_to_mark)
(make_cleanup_value_free_to_mark): Remove.
* utils.h (make_cleanup_value_free_to_mark): Remove.
Diff:
---
gdb/ChangeLog | 6 ++++++
gdb/utils.c | 17 -----------------
gdb/utils.h | 4 ----
3 files changed, 6 insertions(+), 21 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c28b240..7f254b9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2018-07-19 Tom Tromey <tom@tromey.com>
+
+ * utils.c (do_value_free_to_mark)
+ (make_cleanup_value_free_to_mark): Remove.
+ * utils.h (make_cleanup_value_free_to_mark): Remove.
+
2018-07-19 Pedro Alves <palves@redhat.com>
* guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
diff --git a/gdb/utils.c b/gdb/utils.c
index 09381d9..bfcb45b 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -141,23 +141,6 @@ show_pagination_enabled (struct ui_file *file, int from_tty,
because while they use the "cleanup API" they are not part of the
"cleanup API". */
-/* Helper for make_cleanup_value_free_to_mark. */
-
-static void
-do_value_free_to_mark (void *value)
-{
- value_free_to_mark ((struct value *) value);
-}
-
-/* Free all values allocated since MARK was obtained by value_mark
- (except for those released) when the cleanup is run. */
-
-struct cleanup *
-make_cleanup_value_free_to_mark (struct value *mark)
-{
- return make_cleanup (do_value_free_to_mark, mark);
-}
-
/* This function is useful for cleanups.
Do
diff --git a/gdb/utils.h b/gdb/utils.h
index c728449..6852399 100644
--- a/gdb/utils.h
+++ b/gdb/utils.h
@@ -248,10 +248,6 @@ private:
/* Cleanup utilities. */
-/* For make_cleanup_close see common/filestuff.h. */
-
-extern struct cleanup *make_cleanup_value_free_to_mark (struct value *);
-
/* A deleter for a hash table. */
struct htab_deleter
{