Change rewrite_source_path to return a unique_xmalloc_ptr

This changes rewrite_source_path to return a unique_xmalloc_ptr and
fixes up the callers.  This allows removing some cleanups.

ChangeLog
2017-08-22  Tom Tromey  <tom@tromey.com>

	* source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
	* source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
	(find_and_open_source, symtab_to_fullname): Update.
	* psymtab.c (psymtab_to_fullname): Update.
This commit is contained in:
Tom Tromey
2017-08-05 10:29:56 -06:00
parent 14278e1fdb
commit 0b581c69fe
4 changed files with 33 additions and 41 deletions

View File

@ -48,7 +48,7 @@ extern int find_and_open_source (const char *filename,
negative number for error. */
extern int open_source_file (struct symtab *s);
extern char *rewrite_source_path (const char *path);
extern gdb::unique_xmalloc_ptr<char> rewrite_source_path (const char *path);
extern const char *symtab_to_fullname (struct symtab *s);