mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
Change gdb_abspath to return a unique_xmalloc_ptr
This changes gdb_abspath to return a unique_xmalloc_ptr, and fixes up the callers. This allows the removal of a cleanup, and also puts ownership rules into the API, where they belong. ChangeLog 2017-08-22 Tom Tromey <tom@tromey.com> * compile/compile.c (compile_file_command): Use gdb::unique_xmalloc_ptr, std::string. * utils.c (gdb_abspath): Change return type. * source.c (openp): Update. * objfiles.c (allocate_objfile): Update. * main.c (set_gdb_data_directory): Update. * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
This commit is contained in:
@@ -256,7 +256,7 @@ extern char *gdb_realpath (const char *);
|
||||
|
||||
extern char *gdb_realpath_keepfile (const char *);
|
||||
|
||||
extern char *gdb_abspath (const char *);
|
||||
extern gdb::unique_xmalloc_ptr<char> gdb_abspath (const char *);
|
||||
|
||||
extern int gdb_filename_fnmatch (const char *pattern, const char *string,
|
||||
int flags);
|
||||
|
||||
Reference in New Issue
Block a user