From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [PATCH 5/5] Remove free_char_ptr_vec
Date: Sun, 25 Feb 2018 16:33:00 -0000 [thread overview]
Message-ID: <20180225163247.20157-5-simon.marchi@polymtl.ca> (raw)
In-Reply-To: <20180225163247.20157-1-simon.marchi@polymtl.ca>
Nothing is using it anymore.
gdb/ChangeLog:
* common/gdb_vecs.c (free_char_ptr_vec): Remove.
* common/gdb_vecs.h (free_char_ptr_vec): Remove.
---
gdb/common/gdb_vecs.c | 18 ------------------
gdb/common/gdb_vecs.h | 2 --
2 files changed, 20 deletions(-)
diff --git a/gdb/common/gdb_vecs.c b/gdb/common/gdb_vecs.c
index a19d238b3e..445793e420 100644
--- a/gdb/common/gdb_vecs.c
+++ b/gdb/common/gdb_vecs.c
@@ -21,24 +21,6 @@
#include "gdb_vecs.h"
#include "host-defs.h"
-/* Call xfree for each element of CHAR_PTR_VEC and final VEC_free for
- CHAR_PTR_VEC itself.
-
- You must not modify CHAR_PTR_VEC after it got registered with this function
- by make_cleanup as the CHAR_PTR_VEC base address may change on its updates.
- Contrary to VEC_free this function does not (cannot) clear the pointer. */
-
-void
-free_char_ptr_vec (VEC (char_ptr) *char_ptr_vec)
-{
- int ix;
- char *name;
-
- for (ix = 0; VEC_iterate (char_ptr, char_ptr_vec, ix, name); ++ix)
- xfree (name);
- VEC_free (char_ptr, char_ptr_vec);
-}
-
/* Worker function to split character delimiter separated string of fields
STR into a char pointer vector. */
diff --git a/gdb/common/gdb_vecs.h b/gdb/common/gdb_vecs.h
index 17ed06c253..29db27a892 100644
--- a/gdb/common/gdb_vecs.h
+++ b/gdb/common/gdb_vecs.h
@@ -29,8 +29,6 @@ DEF_VEC_P (char_ptr);
DEF_VEC_P (const_char_ptr);
-extern void free_char_ptr_vec (VEC (char_ptr) *char_ptr_vec);
-
/* Split STR, a list of DELIMITER-separated fields, into a char pointer vector.
You may modify the returned strings. */
--
2.16.1
next prev parent reply other threads:[~2018-02-25 16:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-25 16:32 [PATCH 1/5] Make delim_string_to_char_ptr_vec return an std::vector Simon Marchi
2018-02-25 16:32 ` [PATCH 3/5] Make program_space::deleted_solibs a vector of std::string Simon Marchi
2018-02-25 16:32 ` [PATCH 4/5] C++ify charsets Simon Marchi
2018-02-25 16:33 ` Simon Marchi [this message]
2018-02-25 16:47 ` [PATCH 2/5] C++ify program_space Simon Marchi
2018-03-03 4:23 ` [PATCH 1/5] Make delim_string_to_char_ptr_vec return an std::vector Simon Marchi
2018-04-10 19:58 ` Regression with -D_GLIBCXX_DEBUG [Re: [PATCH 1/5] Make delim_string_to_char_ptr_vec return an std::vector] Jan Kratochvil
2018-04-10 20:33 ` Simon Marchi
2018-04-10 20:39 ` Jan Kratochvil
2018-04-10 20:52 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180225163247.20157-5-simon.marchi@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).