+2017-08-03 Tom Tromey <tom@tromey.com>
+
+ * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
+ Remove.
+ * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
+
2017-08-03 Tom Tromey <tom@tromey.com>
* python/py-param.c (compute_enum_values): Use gdb_argv.
because while they use the "cleanup API" they are not part of the
"cleanup API". */
-static void
-do_freeargv (void *arg)
-{
- freeargv ((char **) arg);
-}
-
-struct cleanup *
-make_cleanup_freeargv (char **arg)
-{
- return make_cleanup (do_freeargv, arg);
-}
-
/* Helper function for make_cleanup_ui_out_redirect_pop. */
static void
m_argv = argv;
}
-/* Call libiberty's buildargv, and return the result.
- If buildargv fails due to out-of-memory, call nomem.
- Therefore, the returned value is guaranteed to be non-NULL,
- unless the parameter itself is NULL. */
-
-char **
-gdb_buildargv (const char *s)
-{
- char **argv = buildargv (s);
-
- if (s != NULL && argv == NULL)
- malloc_failure (0);
- return argv;
-}
-
int
compare_positive_ints (const void *ap, const void *bp)
{
extern int parse_escape (struct gdbarch *, const char **);
-char **gdb_buildargv (const char *);
-
/* A wrapper for an array of char* that was allocated in the way that
'buildargv' does, and should be freed with 'freeargv'. */
\f
/* Cleanup utilities. */
-extern struct cleanup *make_cleanup_freeargv (char **);
-
struct ui_out;
extern struct cleanup *
make_cleanup_ui_out_redirect_pop (struct ui_out *uiout);